oracle ADG主备切换故障(ora-16047)
故障现象:
DG主备切换告警
原因:
LOG_ARCHIVE_DEST_2= 'SERVICE=rmanstd ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=rmanpri'
LOG_ARCHIVE_DEST_2参数设置错误
改为从库数据库名rmanpri:
LOG_ARCHIVE_DEST_2= 'SERVICE=rmanpri ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=rmanpri'
处置过程:
1.修改主库参数文件
2.关闭主库,并使用修改后的参数文件启动数据库到nomount状态
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initrmanstd.ora';
ORACLE instance started.
Total System Global Area 584568832 bytes
Fixed Size 2255432 bytes
Variable Size 226493880 bytes
Database Buffers 352321536 bytes
Redo Buffers 3497984 bytes
3.创建spfile
SQL> create spfile from pfile;
4.关闭主库
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
5.启动主库
SQL> startup
ORACLE instance started.
Total System Global Area 584568832 bytes
Fixed Size 2255432 bytes
Variable Size 226493880 bytes
Database Buffers 352321536 bytes
Redo Buffers 3497984 bytes
Database mounted.
Database opened.
6.备库应用实时日志
alter database recover managed standby database using current logfile disconnect from session;
7.查看备库告警日志
日志可以正常传输了
问题解决。