今天有个备库无法启动,报错如下:
Tue Jan 15 11:53:38 中国标准时间 2015
alter database open read only
Tue Jan 15 11:53:38 中国标准时间 2015
SMON: enabling cache recovery
Tue Jan 15 11:53:39 中国标准时间 2015
Database Characterset is ZHS16GBK
Opening with internal Resource Manager plan
replication_dependency_tracking turned off (no async multimaster replication found)
Physical standby database opened for read only access.
Completed: alter database open read only
Tue Jan 15 11:54:04 中国标准时间 2015
Errors in file c:\oracle\product\10.2.0\admin\ntsy\udump\ntsy_ora_9080.trc:
ORA-01504: 递归 SQL 级别 1 出现错误
ORA-01552: 非系统表空间 'IMS_TBS' 不能使用系统回退段
ORA-15512: 在 line 2
解决: 发现主库有个审计触发器,在数据库打开的时候,会往数据库写入审计数据。而备库不能提供写操作,所以需考虑触发器对备库的影响。取消触发器或在触发器加个备库判断, 改为 如下即可:
SQL> CREATE OR REPLACE TRIGGER "OP".logad
2 AFTER LOGON on database
3 declare
4 db_role varchar2(30);
5 begin
6 select database_role into db_role from v$database;
7 If db_role <> ' PHYSICAL STANDBY ' then
8 insert into op.logad values (SYS_CONTEXT('USERENV', 'SESSION_USER'),
9 SYSDATE,SYS_CONTEXT('USERENV','IP_ADDRESS')) ;
10 end if;
11 end;
12 /
alter database open read only
Tue Jan 15 11:53:38 中国标准时间 2015
SMON: enabling cache recovery
Tue Jan 15 11:53:39 中国标准时间 2015
Database Characterset is ZHS16GBK
Opening with internal Resource Manager plan
replication_dependency_tracking turned off (no async multimaster replication found)
Physical standby database opened for read only access.
Completed: alter database open read only
Tue Jan 15 11:54:04 中国标准时间 2015
Errors in file c:\oracle\product\10.2.0\admin\ntsy\udump\ntsy_ora_9080.trc:
ORA-01504: 递归 SQL 级别 1 出现错误
ORA-01552: 非系统表空间 'IMS_TBS' 不能使用系统回退段
ORA-15512: 在 line 2
解决: 发现主库有个审计触发器,在数据库打开的时候,会往数据库写入审计数据。而备库不能提供写操作,所以需考虑触发器对备库的影响。取消触发器或在触发器加个备库判断, 改为 如下即可:
SQL> CREATE OR REPLACE TRIGGER "OP".logad
2 AFTER LOGON on database
3 declare
4 db_role varchar2(30);
5 begin
6 select database_role into db_role from v$database;
7 If db_role <> ' PHYSICAL STANDBY ' then
8 insert into op.logad values (SYS_CONTEXT('USERENV', 'SESSION_USER'),
9 SYSDATE,SYS_CONTEXT('USERENV','IP_ADDRESS')) ;
10 end if;
11 end;
12 /
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30074459/viewspace-1403787/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30074459/viewspace-1403787/