dataguard 笔记
推荐按照三思的文档去做,当然首先要了解dataguard的原理
也是在同一台机器上两个DATABASE之间的dataguard
遇到了几个问题:
1.三思在关了primary之后就没有起来了,其实可以在复制完datafiles和修改完pfile之后马上
CREATE spfile FROM pfile;
startup;
2.配置完成后,在primary查询
select status,target,archiver,error,process from v$archive_dest;
可以看到各dest的状态
3.如果遇到ORA-01031: insufficient privileges
很可能是standby的密码文件没有创立或者sys密码和primary的sys不一样
正常情况下:
select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
4.检查两边同步情况:
两边对比
select max(sequence#) from v$archived_log;
5.检查switchover状态
select switchover_status from v$database;
状态解释:
引用
NOT ALLOWED - Either this is a standby database and the primary database has
not been switched first, or this is a primary database and there are no standby databases.
SESSIONS ACTIVE - Indicates that there are active SQL sessions attached to
the primary or standby database that need to be disconnected before the
switchover operation is permitted.
SWITCHOVER PENDING - This is a standby database and the primary database
switchover request has been received but not processed.
SWITCHOVER LATENT - The switchover was in pending mode, but did not complete
and went back to the primary database.
TO PRIMARY - This is a standby database, with no active sessions, that is
allowed to switch over to a primary database.
TO STANDBY - This is a primary database, with no active sessions, that is
allowed to switch over to a standby database.
RECOVERY NEEDED - This is a standby database that has not received the
switchover request.
During normal operations it is acceptable to see the following values for
SWITCHOVER_STATUS on the primary to be SESSIONS ACTIVE or TO STANDBY.
During normal operations on the standby it is acceptable to see the values
of NOT ALLOWED or SESSIONS ACTIVE.
4. ORA-16053
检查DG_CONFIG
show parameter log_archive_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(thadgdb5,thadgdb6)
推荐:
1.盖老师9i的笔记
2.关于switchover的参考