ÎÒÃÇÔÚÀûÓÃEXP/IMP½øÐÐ¿çÆ½Ì¨Ç¨ÒÆµÄʱºò£¬ÓÉÓÚ±í¿Õ¼ä·¾¶±ä¸ü£¬ÐèÒªÏÈÊÖ¹¤´´½¨ÔÚÄ¿±ê¶Ë´´½¨ÓëÔ´¶ËÒ»Öµıí¿Õ¼äºÍÊý¾ÝÎļþ£¬ÒÔÏÂΪ´´½¨Éú³ÉÓï¾äµÄ½Å±¾¡£
Ò».ÔÚÔ´¶ËÊý¾Ý¿âÖ´ÐÐÒÔÏÂÃüÁÉú³É´´½¨½Å±¾
select 'create tablespace ' || b.NAME || ' DATAFILE ' || chr(39) || a.NAME || chr(39) || ' SIZE ' || a.BYTES / 1024 / 1024 || ' m;'
from v$datafile a, v$tablespace b
where a.ts# = b.TS# And b.INCLUDED_IN_DATABASE_BACKUP='YES'
Union All
select 'Create Temporary Tablespace ' || b.NAME || ' Tempfile ' || chr(39) || a.NAME ||chr(39) || ' SIZE ' || a.BYTES / 1024 / 1024 || ' m;'
from v$tempfile a, v$tablespace b
where a.ts# = b.TS# And b.INCLUDED_IN_DATABASE_BACKUP='NO'
Union All
select 'alter database datafile ' ||chr(39) ||a.NAME ||chr(39)||' autoextend on ;'
from v$datafile a, v$tablespace b
where a.ts# = b.TS# And b.INCLUDED_IN_DATABASE_BACKUP='YES'
Union All
select 'alter database Tempfile ' ||chr(39) ||a.NAME ||chr(39)||' autoextend on ;'
from v$tempfile a, v$tablespace b
where a.ts# = b.TS# And b.INCLUDED_IN_DATABASE_BACKUP='NO'
¶þ.Éú³É½á¹ûÀàËÆÈçÏ£º
Àý£º
create tablespace system datafile '/oradata/orcl/system01.dbf' size 1000 m;
create tablespace undotbs1 datafile '/oradata/orcl/undotbs01.dbf' size 1630 m;
create tablespace sysaux datafile '/oradata/orcl/sysaux01.dbf' size 1000 m;
create tablespace users datafile '/oradata/orcl/users01.dbf' size 5 m;
......
create tablespace zl9indexdev datafile '/oradata/orcl/zl9indexdev.dbf' size 20 m;
create tablespace zl9humanbase datafile '/oradata/orcl/zl9humanbase.dbf' size 20 m;
create tablespace zl9humaninfo datafile '/oradata/orcl/zl9humaninfo.dbf' size 20 m;
.......
alter database datafile '/oradata/orcl/system01.dbf' autoextend on ;
alter database datafile '/oradata/orcl/undotbs01.dbf' autoextend on ;
alter database datafile '/oradata/orcl/sysaux01.dbf' autoextend on ;
alter database datafile '/oradata/orcl/users01.dbf' autoextend on ;
......
alter database tempfile '/oradata/orcl/zltoolstmp.dbf' autoextend on ;
ͨ¹ýÌæ»»·½Ê½ÐÞ¸ÄÉú³ÉÓï¾äµÄÊý¾ÝÎļþ·¾¶£¬ÔÚÄ¿±ê¶ËÖ´ÐиÃÃüÁÉú³É±í¿Õ¼äºÍÊý¾ÝÎļþ£¬×îºóÔÙ½øÐÐÊý¾Ýµ¼Èë