思路; 新建一个表空间
然后指定其为默认永久表空间
然后删除原来的user表空间
[php]
SYS@ning>alter database default tablespace test;
Database altered.
SQL> alter tablespace users offline;
Tablespace altered.
SQL> drop tablespace users;
drop tablespace users
*
ERROR at line 1:
ORA-12919: Can not drop the default permanent tablespace
能告诉我怎么删除么?
总结
sqlplus '/as sysdba'
SQL>shutdown immediate
SQL>startup
#创建一个临时表空间temp02,用作临时替换
SQL>create temporary tablespace temp02 tempfile '/u2/oradb/oradata/topprod/temp02.dbf' size 10M autoextend on next 10M;
#将系统临时表空间指向temp02
SQL>alter database default temporary tablespace temp02;
#删除原来的临时表空间temp
SQL>drop tablespace temp including contents and datafiles;
#创建新的临时表空间temp
SQL>create temporary tablespace temp tempfile '/u2/oradb/oradata/topprod/temp01.dbf' size 4096M autoextend on next 100M;
#将系统临时表空间指回temp
SQL>alter database default temporary tablespace temp;
#删除临时表空间temp02
SQL>drop tablespace temp02 including contents and datafiles;