关于ADG切换主备可能会遇到的问题

本小妞迷上赌 提交于 2020-02-16 18:24:49

1, 用户名密码错误

这种错误一般要考虑你的密码文件问题,因为要远程登录,重新创建orapw文件,并且检查进行切换操作的用户是否拥有相应的权限

2, ORA-16191 ORA-01017 and ORA-16000 shipping the logs to Standby database (Doc ID 2129339.1)

Error 1017 received logging on to the standby

------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
------------------------------------------------------------
PING[ARC2]: Heartbeat failed to connect to standby 'test_dg'.

 

根本原因:

这是因为有触发器再switchover完成前尝试启用,又或者当实例是READ ONLY的时候,触发器的内容包含了DML/DDL操作。比如说,一个AFTER LOGON的触发器,尝试往表里写入登录信息的触发器,这种触发器只有DB是open with read write模式才能工作。

这种情况就会进而引起ADG的报错。

解决这个问题,

第一个,你可以选择将standby只启动到mount状态

第二个选择,disable standby的所有系统事件触发器,比如说logon或者shutdown,alter system set "_system_trig_enabled"=false; 当然,这种操作,你需要记得再switchover之后将其enable回去

 

Note: 

_system_trig_enabled这个参数会影响那些系统触发器,系统触发器是用来追踪系统级别的变更的,比如说logon或者shutdown。

通过以下命令查看哪些trigger是受影响的:

select a.obj#, a.sys_evts, b.name from trigger$ a,obj$ b
where a.sys_evts > 0 and a.obj#=b.obj#; 1. 系统定义的事件参数:以下是系统提供的函数(参数)列表,所有的这些是在系统创建的时候通过catproc.sql创建出来的,OWNER是SYS用户。所有的用户都可以通过公共同义词来使用它们。
ora_client_ip_address, ora_database_name, 
ora_des_encrypted_password,ora_dict_obj_name, 
ora_dict_obj_name_list, ora_dict_obj_owner,
ora_dict_obj_owner_list, ora_dict_obj_type, ora_grantee,        
ora_instance_num,ora_is_alter_column, ora_is_creating_nested_table, 
ora_is_drop_column,ora_is_servererror, ora_login_user, 
ora_privileges, ora_revokee,ora_server_error, ora_sysevent, 
ora_with_grant_option

2. 事件类型
1)Resource Manager event
STARTUP, SHUTDOWN, SERVERERROR
        
2)Client Event
        
AFTER LOGON, BEFORE LOGOFF, BEFORE CREATE, AFTER CREATE,
BEFORE ALTER, AFTER ALTER, BEFORE DROP, AFTER DROP,
BEFORE ANALYZE, AFTER ANALYZE, BEFORE ASSOCIATE STATISTICS,
AFTER ASSOCIATE STATISTICS, BEFORE AUDIT, AFTER AUDIT,
BEFORE NOAUDIT, AFTER NOAUDIT, BEFORE COMMENT, AFTER COMMENT,
BEFORE CREATE, AFTER CREATE, BEFORE DDL, AFTER DDL,
BEFORE DISASSOCIATE STATISTICS, AFTER DISASSOCIATE STATISTICS,
BEFORE GRANT, AFTER GRANT, BEFORE RENAME, AFTER RENAME,
BEFORE REVOKE, AFTER REVOKE, BEFORE TRUNCATE, AFTER TRUNCATE
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!