错误1:
ORA-16057: DGID from server not in Data Guard configuration
原因:主库没有设置参数log_archive_config
解决方法*.log_archive_config='dg_config=(orcl,testdg)'
alter system set log_archive_config='dg_config=(orcl,testdg)' scope=both;
错误2:
Error 1031 received logging on to the standby
Errors in file f:\orcl\diag\rdbms\orcl\orcl\trace\orcl_arc3_736.trc:
ORA-01031: insufficient privileges
PING[ARC3]: Heartbeat failed to connect to standby 'testdg'. Error is 1031.
解决问题思路:
1、检查sys密码是否正确,大部分是这个原因。
一般建议使用主库的密码文件修改为PWDstanddy_name.ora 当做备库的密码文件。
在linux 下 使用 ls -l 密码查看备库的用户是否有密码文件的读写权限!
2、Oracle用户有写standby_archive_dest的权限,11g 已经将这个参数废弃了!
错误3:
ORA-16025: parameter LOG_ARCHIVE_DEST_2 contains repeated or conflicting attributes
*.log_archive_dest_2='SERVICE =orcl LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
*.LOG_ARCHIVE_DEST_2='SERVICE=orcl LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
出现该错误的原因是这个语句中某两个单词之间缺少空格,或者是拼写错误。我的错误是:
SERVICE=orcl与SERVICE =orcl之间的区别,即后者service 与=之间多了一个空格!
还有的是LOG_ARCHIVE_DEST_2='SERVICE=orcl LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'
db_unique_name前少了一个空格导致的。
错误4
ORA-16136: Managed Standby Recovery not active
Cause: An attempt was made to cancel a managed recovery session but no managed recovery session was active.
Action: No action is necessary.
cause解释在试图取消恢复会话的时候出错,原因是没有活跃的恢复会话。
TESTDG>alter database recover managed standby database cancel;
alter database recover managed standby database cancel
*
第 1 行出现错误:
ORA-16136: 受管备用恢复未激活
打开另一个会话session 2 ,在这个会话上执行
C:\Documents and Settings\Administrator>set oracle_sid=testdg
C:\Documents and Settings\Administrator>sqlplus "/as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on 星期一 9月 20 18:35:51 2010
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select db_unique_name from v$database;
DB_UNIQUE_NAME
------------------------------
testdg
SQL> alter database recover managed standby database cancel;
数据库已更改。
此时 备库已经停止应用归档日志了!
然后在出现问题的会话上执行所需要的操作.