DG主库到备库ORA-12154

搭建DG过程中遇到一个问题,复制完成并创建了spfile,重启后打开数据库时报错

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/SCPRD/SCPRD_system01.dbf'

 现在备库是MOUNT状态,在备库开启日志应用后,主库切换日志但备库一个归档日志都没有收到,

SYS>select process,status from v$managed_standby;

PROCESS STATUS
--------- ------------
DGRD ALLOCATED
ARCH CLOSING
DGRD ALLOCATED
ARCH CLOSING
ARCH OPENING
ARCH CLOSING
LNS CONNECTED
DGRD ALLOCATED
LNS OPENING

查看了一下主库参数,有ORA-12154错误


DEST_ID DEST_NAME STATUS TYPE ERROR GAP_STATUS
---------- ------------------------------ --------- ---------------- ----------------------------------------------------------------- ------------------------
1 LOG_ARCHIVE_DEST_1 VALID LOCAL
2 LOG_ARCHIVE_DEST_2 ERROR UNKNOWN ORA-12154: TNS:could not resolve the connect identifier specified RESOLVABLE GAP

tnsping 主库和备库均正常。

有一篇文章记录了这个错误,并转载了官方文档。

主库到standby报错解决:Error 12154 received logging on to the standby ORA-12154_ITPUB博客
http://blog.itpub.net/25583515/viewspace-2156171/

原因:在添加新的备用数据库之后,将相应的新的TNS别名条目添加到主节点上的tnsnames中,但是既没有重新启动实例进程,也没有重新启动归档进程。

重启主库后故障解除。

 Adding an new Standby fails with error Ora-12154: TNS:could not resolve the connect identifier specified (ID 1240558.1)

 

posted @ 2020-11-02 14:13  尘世间一个迷途小书童  阅读(446)  评论(0编辑  收藏  举报