主備庫所在機器都重啟後,rac(主庫)開機自動啟動,但備庫(單實例)不是開機啟動,現已手工啟動到mount,並已在備庫上alter database recover standby database disconnect from session;。
發現主庫歸檔日志無法同步到備庫:
rac1:
rac2:
備庫:
--奇怪的是,v$archive_gap竟然還為空。
查看報警日志:
首先檢查一下備庫監聽是否啟動(當狀態為‘ready’,表示已經啟動)
如果監聽未啟動,則啟動監聽:lsnrctl start即可。
如果監聽已經啟動,則:
手工把缺的日志從主庫scp/rcp拷過來,然後alter database register logfile.
比如下面是應該拷貝的日志:
+DATA/prod/1_29_856078807.arc 29 1
+DATA/prod/2_14_856078807.arc 14 2
+DATA/prod/1_30_856078807.arc 30 1
+DATA/prod/2_15_856078807.arc 15 2
+DATA/prod/2_16_856078807.arc 16 2
run {
copy archivelog '+DATA/PROD/1_29_856078807.arc' to '/home/oracle/1_29_856078807.arc';
copy archivelog '+DATA/PROD/1_30_856078807.arc' to '/home/oracle/1_30_856078807.arc';
copy archivelog '+DATA/prod/2_14_856078807.arc' to '/home/oracle/2_14_856078807.arc';
copy archivelog '+DATA/prod/2_15_856078807.arc' to '/home/oracle/2_15_856078807.arc';
copy archivelog '+DATA/prod/2_16_856078807.arc' to '/home/oracle/2_16_856078807.arc';
}
Starting backup at 27-AUG-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive copy
input archive log thread=1 sequence=29 recid=82 stamp=856665609
output filename=/home/oracle/1_29_856078807.arc recid=89 stamp=856669631
channel ORA_DISK_1: archivelog copy complete, elapsed time: 00:00:02
Finished backup at 27-AUG-14
……
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /arch/sdyprod
Oldest online log sequence 0
Next log sequence to archive 0
Current log sequence 0
[oracle@rac1 ~]$ scp 2* 192.168.8.225:/arch/sdyprod/
[email protected]'s password:
2_14_856078807.arc 100% 1024 1.0KB/s 00:00
2_15_856078807.arc 100% 121KB 120.5KB/s 00:00
2_16_856078807.arc 100% 20KB 20.0KB/s 00:00
[oracle@rac1 ~]$ scp 1* 192.168.8.225:/arch/sdyprod/
[email protected]'s password:
1_29_856078807.arc 100% 5356KB 5.2MB/s 00:01
1_30_856078807.arc 100% 12MB 11.7MB/s 00:00
[oracle@rac1 ~]$
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database register logfile '/arch/sdyprod/1_29_856078807.arc';
……
Database altered.
SQL> alter database register logfile '/arch/sdyprod/2_16_856078807.arc';
Database altered.
SQL> alter database recover managed standby database disconnect from session;
Database altered.
--本篇文章參考自:http://blog.itpub.net/14507784/viewspace-759605/
如果還是無法解決,可以參考文章:http://www.xifenfei.com/1176.html
貼下報錯信息呢?
難道是沒有對gap對象進行申明 報錯截圖看看...
應該會有顯示哪行錯誤.... 或者貼你的代碼 估計你是沒有初始化對象
我用有道查了,好多意思,如果可以你去有道“www.youdao.com/”看看吧。