ORA-01552: cannot use system rollback segment for...错误解决
故障现象:
今天本要做数据库的不完全恢复,但是在准备环境的时候需要创建几张表做为恢复用的基表。在创建表的时候
就报了如下一段错误:
13:56:03 SQL> create table wwl001 (id number,name varchar(12));
create table wwl001 (id number,name varchar(12))
*
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'WWL';
!!!! 非系统表空间'WWL'不能使用系统回滚段
问题原因:
我昨天做了由于磁盘损坏导致数据库灾难的恢复,可能是由于恢复的时候参数文件修改了,所以才导致成回滚段
变成了手动管理模式,我们可以看看如下步骤:
详情:
1、创建表,非系统表空间不能使用回滚段
13:56:03 SQL> create table wwl001 (id number,name varchar(12));
create table wwl001 (id number,name varchar(12))
*
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'WWL';
2、查看回滚段管理方式,为手动管理
13:57:24 SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string MANUAL
undo_retention integer 900
undo_tablespace string UNDOTBS1
3、查看回滚段状态
13:57:23 SQL> select segment_name, tablespace_name, status from dba_rollback_segs;
SEGMENT_NAME TABLESPACE_NAME STATUS
------------------------------ ------------------------------ ----------------
SYSTEM SYSTEM ONLINE
_SYSSMU1$ UNDOTBS1 OFFLINE
_SYSSMU2$ UNDOTBS1 OFFLINE
_SYSSMU3$ UNDOTBS1 OFFLINE
_SYSSMU4$ UNDOTBS1 OFFLINE
_SYSSMU5$ UNDOTBS1 OFFLINE
_SYSSMU6$ UNDOTBS1 OFFLINE
_SYSSMU7$ UNDOTBS1 OFFLINE
_SYSSMU8$ UNDOTBS1 OFFLINE
_SYSSMU9$ UNDOTBS1 OFFLINE
_SYSSMU10$ UNDOTBS1 OFFLINE
11 rows selected.
4、针对现象修改undo_management参数为auto即可。
14:08:06 SQL> alter system set undo_management=auto scope=spfile;
System altered.
14:17:51 SQL> shutdown immediate
Database closed.
Database dismounted.
Oracle instance shut down.
14:18:22 SQL> startup
ORACLE instance started.
Total System Global Area 100663296 bytes
Fixed Size 1217884 bytes
Variable Size 88083108 bytes
Database Buffers 8388608 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
5、查看回滚段状态
14:18:55 SQL> select segment_name, tablespace_name, status from dba_rollback_segs;
SEGMENT_NAME TABLESPACE_NAME STATUS
------------------------------ ------------------------------ ----------------
SYSTEM SYSTEM ONLINE
_SYSSMU1$ UNDOTBS1 ONLINE
_SYSSMU2$ UNDOTBS1 ONLINE
_SYSSMU3$ UNDOTBS1 ONLINE
_SYSSMU4$ UNDOTBS1 ONLINE
_SYSSMU5$ UNDOTBS1 ONLINE
_SYSSMU6$ UNDOTBS1 ONLINE
_SYSSMU7$ UNDOTBS1 ONLINE
_SYSSMU8$ UNDOTBS1 ONLINE
_SYSSMU9$ UNDOTBS1 ONLINE
_SYSSMU10$ UNDOTBS1 ONLINE
11 rows selected.
6、我们再执行刚才的建表语句,非常好,可以创建表了。
14:19:51 SQL> create table wwl001 (id number,name varchar(12));
Table created.
更多Oracle相关信息见 专题页面