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測試可以連接也不代表密碼文件一致

還是需要物理拷貝,不要去主庫節點一個個的改密碼

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章