ADG搭建时归档dest报错ORA-01033: ORACLE initialization or shutdown in progress

我有2个备库,docare5pri和docare5adg

其中2节点的实例都没有传输日志成功,1节点都没有问题

SQL>  SELECT inst_id,DESTINATION, STATUS, ERROR FROM gV$ARCHIVE_DEST ;

   INST_ID DESTINATION                                        STATUS    ERROR
---------- -------------------------------------------------- --------- -----------------------------------------------------------------
         2 USE_DB_RECOVERY_FILE_DEST                          VALID
         2 docare5pri                                         ERROR     ORA-01033: ORACLE initialization or shutdown in progress
         2 docare5adg                                         ERROR     ORA-01033: ORACLE initialization or shutdown in progress

         2                                                    INACTIVE
         2                                                    INACTIVE
         2                                                    INACTIVE

         1 USE_DB_RECOVERY_FILE_DEST                          VALID
         1 docare5pri                                         VALID
         1 docare5adg                                         VALID

         1                                                    INACTIVE

1节点alert看是去是正常的:
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_2
******************************************************************
Thu Jun 11 13:35:00 2020
LNS: Standby redo logfile selected for thread 1 sequence 43660 for destination LOG_ARCHIVE_DEST_2
Thu Jun 11 13:36:59 2020
Thread 1 cannot allocate new log, sequence 43661
Checkpoint not complete
  Current log# 3 seq# 43660 mem# 0: +DATA/docare5/onlinelog/group_3.292.881086569
  Current log# 3 seq# 43660 mem# 1: +ARCH/docare5/onlinelog/group_3.263.881086569
Thread 1 advanced to log sequence 43661 (LGWR switch)
  Current log# 2 seq# 43661 mem# 0: +DATA/docare5/onlinelog/group_2.293.881086569
  Current log# 2 seq# 43661 mem# 1: +ARCH/docare5/onlinelog/group_2.264.881086569
Thu Jun 11 13:37:02 2020
Archived Log entry 68397 added for thread 1 sequence 43660 ID 0x29571da4 dest 1:
Thu Jun 11 13:37:02 2020
LNS: Standby redo logfile selected for thread 1 sequence 43661 for destination LOG_ARCHIVE_DEST_3
Thu Jun 11 13:37:07 2020
LNS: Standby redo logfile selected for thread 1 sequence 43661 for destination LOG_ARCHIVE_DEST_2
Thu Jun 11 13:55:06 2020
ALTER SYSTEM SET log_archive_dest_state_3='DEFER' SCOPE=BOTH;
ALTER SYSTEM SET log_archive_dest_state_3='ENABLE' SCOPE=BOTH;
Thu Jun 11 13:55:09 2020
Thread 1 advanced to log sequence 43662 (LGWR switch)
  Current log# 1 seq# 43662 mem# 0: +DATA/docare5/onlinelog/group_1.294.881086569
  Current log# 1 seq# 43662 mem# 1: +ARCH/docare5/onlinelog/group_1.311.881086569
Thu Jun 11 13:55:09 2020
******************************************************************
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_3
******************************************************************
LNS: Standby redo logfile selected for thread 1 sequence 43662 for destination LOG_ARCHIVE_DEST_3
Thu Jun 11 13:55:09 2020
Archived Log entry 68402 added for thread 1 sequence 43661 ID 0x29571da4 dest 1:
Thu Jun 11 13:55:12 2020
LNS: Standby redo logfile selected for thread 1 sequence 43662 for destination LOG_ARCHIVE_DEST_2


2节点alert日志,有报错,连接不到备库:
LGWR: Setting 'active' archival for destination LOG_ARCHIVE_DEST_3
******************************************************************
Thu Jun 11 13:54:33 2020
Error 1033 received logging on to the standby
Suppressing further error logging of LOG_ARCHIVE_DEST_3.
Error 1033 received logging on to the standby
Suppressing further error logging of LOG_ARCHIVE_DEST_3.
Errors in file /oracle/app/oracle/diag/rdbms/docare5/docare52/trace/docare52_nsa3_125285.trc:
ORA-01033: ORACLE initialization or shutdown in progress
Thu Jun 11 13:54:44 2020
Error 1033 received logging on to the standby
Suppressing further error logging of LOG_ARCHIVE_DEST_2.
FAL[server, ARC3]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance docare52 - Archival Error. Archiver continuing.
Thu Jun 11 13:54:45 2020
Error 1033 received logging on to the standby
Suppressing further error logging of LOG_ARCHIVE_DEST_2.
Thu Jun 11 13:54:46 2020
Error 1033 received logging on to the standby
Suppressing further error logging of LOG_ARCHIVE_DEST_3.
FAL[server, ARC0]: FAL archive failed, see trace file.
ARCH: FAL archive failed. Archiver continuing
ORACLE Instance docare52 - Archival Error. Archiver continuing.
Thu Jun 11 14:00:02 2020
Error 1033 received logging on to the standby
Thu Jun 11 14:00:15 2020
Error 1033 received logging on to the standby
Thu Jun 11 14:01:17 2020
Error 1033 received logging on to the standby
Thu Jun 11 14:01:31 2020
Error 1033 received logging on to the standby
Thu Jun 11 14:02:33 2020
Error 1033 received logging on to the standby
Thu Jun 11 14:02:45 2020
Error 1033 received logging on to the standby
Thu Jun 11 14:03:48 2020
Error 1033 received logging on to the standby
Thu Jun 11 14:04:00 2020
Error 1033 received logging on to the standby


2节点alert中的trc信息:
*** 2020-06-11 13:54:32.000
LOG_ARCHIVE_DEST_2 depends upon me, but my destination index 2 does not match its destination index 1

*** 2020-06-11 13:54:33.017
OCISessionBegin failed -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'

*** 2020-06-11 13:54:34.043
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1033 and errmsg is 'ORA-01033: ORACLE initialization or shutdown in progress
'
*** 2020-06-11 13:54:34.056 4338 krsh.c
Error 1033 received logging on to the standby
*** 2020-06-11 13:54:34.056 939 krsu.c
Error 1033 connecting to destination LOG_ARCHIVE_DEST_3 standby host 'docare5adg'
Error 1033 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'docare5adg'
*** 2020-06-11 13:54:34.057 4338 krsh.c
Error 1033 for archive log file 6 to 'docare5adg'
*** 2020-06-11 13:54:34.057 2917 krsi.c
krsi_dst_fail: dest:3 err:1033 force:0 blast:1

 

 

我测试了sqlplus 连接没问题,无论从主库1、2节点连备库,还是从备库连主库1、2接电脑都没问题

 我是sqlplus sys/1234@tns as sysdba这样去测试连接的

刚开始以为主备库密码肯定是一致的呀

但是不代表密码文件物理一致

查看主库1、2节点sysdba权限用户是否有区别
SQL> select * from gv$pwfile_users;

   INST_ID USERNAME                       SYSDB SYSOP SYSAS
---------- ------------------------------ ----- ----- -----
         1 SYS                            TRUE  TRUE  FALSE
         2 SYS                            TRUE  TRUE  FALSE


在主库一个节点上更改密码
在源库1节点上修改SYS密码:
alter user sys identified by " 123456";


复制密码文件到备库2个节点:
scp $ORACLE_HOME/dbs/orapwcrmzcdb1 135.1.1.106:$ORACLE_HOME/dbs
scp $ORACLE_HOME/dbs/orapwcrmzcdb1 135.1.1.107:$ORACLE_HOME/dbs
复制密码文件到主库其它节点:
scp $ORACLE_HOME/dbs/orapwcrmzcdb1 135.1.1.211:$ORACLE_HOME/dbs

在目标端2节点上:
cp $ORACLE_HOME/dbs/orapwcrmzcdb1 $ORACLE_HOME/dbs/orapwcrmzcdb2

在源端2节点上:
cp $ORACLE_HOME/dbs/orapwcrmzcdb1 $ORACLE_HOME/dbs/orapwcrmzcdb2

 

在远端defer一下

alter system set log_archive_dest_state_2=defer;
alter system set log_archive_dest_state_2=enable;
alter system set log_archive_dest_state_3=defer;
alter system set log_archive_dest_state_3=enable;

成功同步,无报错

 

 

结论:

sqlplus测试可以连接也不代表密码文件一致

还是需要物理拷贝,不要去主库节点一个个的改密码

你可能感兴趣的:(ORACLE,DG,ORACLE,RAC)