ORA-01552 cannot use system rollback segment for non-system tablespace

本文介绍了解决Oracle数据库中ORA-01552错误的方法。通过调整undo表空间设置并重启数据库,成功解决了无法在非系统表空间使用系统回滚段的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天在测试功能的时候,出现ORA-01552错误,如下:

scott@CNHTM> update emp set sal=sal+1 where empno=7369;
update emp set sal=sal+1 where empno=7369
*
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'TBS_1'

解决过程如下:

确定undo表空间的相关参数

scott@CNHTM> show parameter undo

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string MANUAL
undo_retention integer 900
undo_tablespace string

查询undo表空间的名称

scott@CNHTM> select name from v$tablespace;

NAME
------------------------------
SYSTEM
UNDOTBS1
SYSAUX
TEMPTS1
TBS_1
USERS
INDX

7 rows selected.

修改数据库参数
1、设置默认undo表空间
2、undo表空间为自动管理

scott@CNHTM> alter system set undo_tablespace=UNDOTBS1 scope=spfile;

System altered.

scott@CNHTM>
scott@CNHTM> alter system set undo_management=auto scope=spfile;

System altered.

重启数据库,测试原来出错的语句

scott@CNHTM> shutdown immediate
ORA-01031: insufficient privileges
scott@CNHTM> conn / as sysdba
Connected.
sys@CNHTM> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@CNHTM> startup
ORACLE instance started.

Total System Global Area 184549376 bytes
Fixed Size 1218388 bytes
Variable Size 134219948 bytes
Database Buffers 41943040 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
sys@CNHTM>
sys@CNHTM> conn scott/tiger
Connected.
scott@CNHTM> update emp set sal=sal+1 where empno=7369;

1 row updated.

--end--

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22049049/viewspace-1041740/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22049049/viewspace-1041740/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值