针对temp表空间,我们可以在打开数据的状态下直接操作:
SQL> create temporary tablespace temp1 tempfile '/u01/Oracle/10g/oradata/gt10gnew/temp01.dbf' size 20M autoextend on;
Tablespace created.
SQL> alter database default temporary tablespace temp1;
Database altered.
SQL> drop tablespace temp including contents and datafiles;
Tablespace dropped.
SQL> create temporary tablespace gtlionstmp1 tempfile '/u01/oracle/10g/oradata/gt10gnew/gtlionstmp01.dbf' size 20M autoextend on;
Tablespace created.
SQL> alter user gtlions temporary tablespace gtlionstmp1;
User altered.
SQL> drop tablespace gtlionstmp including contents and datafiles;
Tablespace dropped.
针对redo日志文件,我们可以在打开数据的状态下直接操作:
SQL> alter database add logfile group 4 ('/u01/oracle/10g/oradata/gt10gnew/redo04a.log','/u01/oracle/10g/oradata/gt10gnew/redo04b.log') size 20M;
Database altered.
SQL> alter database add logfile group 5 ('/u01/oracle/10g/oradata/gt10gnew/redo05a.log','/u01/oracle/10g/oradata/gt10gnew/redo05b.log') size 20M;
\
Database altered.
SQL> SP2-0042: unknown command "\" - rest of line ignored.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database drop logfile group 2;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter database drop logfile group 3;
Database altered.
