Oracle database 12c DG – standby:ORA-00305: log 3 of thread 1 inconsistent; belongs to another database
在Oracle12c的DG环境中遇到了如题所示的错误。[……]
Adamhuan's Data Center - 【逻辑驱动数据】
数据玩物、代码屋、1/0游戏:(零和博弈)/ 禅宗意志 / 规则战争 / 解放数据力量 / 技术的飞速发展并没有改变这个世界,因为,这个世界从没有变,它只是越来越趋近于它本来的模样。
在Oracle12c的DG环境中遇到了如题所示的错误。[……]
如题所示,本文将讲述关于Oracle DB 12c,在SUSE 12上的DG架构的搭建。
不过需要注意的是:
因为模拟一些特殊环境,所以本文中的部分配置可能会与正确的(通常)配置不一样:
1. 涉及DG的两个节点的主机名会一样,但是IP不一样
2. 通过主库的RMAN备份的异机恢复构建备[……]
Info。
——————
主库:oracleme
unique: orcl
sid: orcl
——————
从库:oracleyou
unique: stdbyme
sid: orcl
一、切换前
主:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
[oracle@oracleme ~]$ id oracle uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba) [oracle@oracleme ~]$ [oracle@oracleme ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue Apr 10 16:32:03 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> SQL> select switchover_status from v$database; SWITCHOVER_STATUS ---------------------------------------- TO STANDBY SQL> SQL> select database_role from v$database; DATABASE_ROLE -------------------------------- PRIMARY SQL> SQL> show parameter unique NAME TYPE ------------------------------------ ---------------------- VALUE ------------------------------ db_unique_name string orcl SQL> SQL> select instance_name,status from v$instance; INSTANCE_NAME STATUS -------------------------------- ------------------------ orcl OPEN SQL> SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production [oracle@oracleme ~]$ |
[……]
开始本文的前提:
1. CentOS Linux 7.4.1708:2台
2. 都安装了Oracle 12c database
3. 主节点已经建好了库
在我的环境里:
Primary – 10.158.1.97
Standby – 10.158.1.161
文件:/etc/h[……]
如题所示,在启动SQLPLUS的时候,你可能遇到上面的错误。
具体如下:
1 2 3 4 5 6 7 8 9 10 11 12 |
[oracle@oracleme ~]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Wed Apr 4 14:21:08 2018 Copyright (c) 1982, 2016, Oracle. All rights reserved. ERROR: ORA-12705: Cannot access NLS data files or invalid environment specified Enter user-name: ^C [oracle@oracleme ~]$ |
造成这个问题的原因是两个环境变量的配置:
1. NLS_LANG
2. ORA_NLS10
正确的配置:
[crayon-63dd9[……]