- 數據從主庫恢復到備庫;打開備庫發現出現異常
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: '/u01/app/oradata/orcl/system01.dbf' |
- 查看告警日志 用tail -200 alert_orcl.log 查看
Standby crash recovery need archive log for thread 1 sequence 27156 to continue. Please verify that primary database is transporting redo logs to the standby database. Wait timeout: thread 1 sequence 27156 |
從告警展示等待超時;就是在主庫傳歸檔日志給備庫。可以找到原因是出在tnsname.ora;或者是否是參數配置Ok;這兩個參數
*.fal_client=
*.fal_server=
- 自己仔細核對一遍;並tnsping 每個網路服務名。再一次啟動
SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> create spfile from pfile='/u01/app/oracle/dbs/pfile_orcl.ora'; File created. SQL> startup ORACLE instance started. Total System Global Area 1603411968 bytes Fixed Size 2213776 bytes Variable Size 1023412336 bytes Database Buffers 570425344 bytes Redo Buffers 7360512 bytes Database mounted. ORA-10458: standby database requires recovery ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/u01/app/oradata/orcl/system01.dbf' |
還是出現一樣的症狀。 原因是一樣嗎?看alert日志吧
Media Recovery Waiting for thread 1 sequence 157 ARC3: Archival started ARC0: STARTING ARCH PROCESSES COMPLETE Error 1017 received logging on to the standby ------------------------------------------------------------ Check that the primary and standby are using a password file and remote_login_passwordfile is set to SHARED or EXCLUSIVE, and that the SYS password is same in the password files. returning error ORA-16191 ------------------------------------------------------------ FAL[client, ARC2]: Error 16191 connecting to orcl_120 for fetching gap sequence Errors in file /u01/app/diag/rdbms/ora11g/orcl/trace/orcl_arc2_25914.trc: ORA-16191: Primary log shipping client not logged on standby |
日志出現
Check that the primary and standby are using a password file and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files. returning error ORA-16191。
這個應該是跟密碼文件有關。
- 在主庫重建下密碼文件;再傳到備庫
orapwd file=orapworcl password=oracle entries=10; scp orapworcl oracle@oracle2:/u01/app/oracle/dbs/ |
- 再一次啟動;看看還會出現什么問題
SQL> alter database open; Database altered. |