搭建物理standby时,一步三折,解决过程如下:
1,主库日志传输失败,切换主库为备库时报ORA-16416(备库与主库不同步错误)。
经分析,LOG_FILE_NAME_CONVERT有误。排除该问题后,仍然不同步。
2尝试复制已归档的文件到备库,在备库执行以下语句后,该日志会自动同步:
ALTER DATABASE REGISTER PHYSICAL LOGFILE '/opt/oracle/oradata/ge/archive/log1_87_676393126.arc';
重新切换主库为备库,仍然报ORA-16416。
3参照Oracle文档,发现部分参数可能有误:
3.1 VALID_FOR=online_logfiles vs online_logfile?
<>
chapter 14 LOG_ARCHIVE_DEST_n Parameter Attributes
VALID_FOR:
The redo_log_type keyword identifies the destination as valid for archiving one of the following:
ONLINE_LOGFILE—This destination is valid only when archiving online redo log files
但测试证实:online_logfiles与online_logfile都可以。
3.2,LOG_FILE_NAME_CONVERT
<
LOG_FILE_NAME_CONVERT
Syntax LOG_FILE_NAME_CONVERT = 'string1' , 'string2' , 'string3' , 'string4' , ...
Where:
string1 is the pattern of the primary database filename==>实际应为备库
string2 is the pattern of the standby database filename==>实际应为主库
通过多次尝试,无果。
4.经过检查主库日志,alert_orcl.log,发现权限不足导致连接失败(insuffient privilege),重建备库密码文件,成功.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/18922393/viewspace-730104/ ,如需转载,请注明出处,否则将追究法律责任。