從9i以後,oracle dataguard 備庫一般都不需要手工處理丟失的日志,FAL自動會幫我們處理,下面通過個案例來講下手工處理丟失的日志的方法:
1.在備庫查詢有哪些日志丟失,沒應用到備庫
SQL> select * from V$ARCHIVE_GAP;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 9873 9876
我們可以看到9873到9876這四個歸檔日志丟失,
2.我們在主庫找到這四個歸檔日志傳送到備庫歸檔目錄下;
3.備庫注冊
alter database register logfile '/oracle/app/oracle/archive/1_9873_629923600.arc';
system alerted
alter database register logfile '/oracle/app/oracle/archive/1_9874_629923600.arc';
system alerted
alter database register logfile '/oracle/app/oracle/archive/1_9875_629923600.arc';
system alerted
alter database register logfile '/oracle/app/oracle/archive/1_9876_629923600.arc';
system alerted
4.檢查數據庫日志看是否應用
Thu Apr 8 15:55:17 2010
Media Recovery Log /oracle/app/oracle/archive/1_9873_629923600.arc
Media Recovery Log /oracle/app/oracle/archive/1_9874_629923600.arc
Media Recovery Log /oracle/app/oracle/archive/1_9875_629923600.arc
Media Recovery Log /oracle/app/oracle/archive/1_9876_629923600.arc
或者查詢視圖
v$archived_log的applied字段
5、檢查備庫是否還有日志GAP
SQL> select * from V$ARCHIVE_GAP;
出現沒有行選擇,則表示不存在歸檔日志丟失問題。
--本篇文章轉自http://blog.itpub.net/7199859/viewspace-631726/
是不是沒有create standby redolog
明顯沒有啟用redolog,log sequence是0。
用switch切日志,如果還是0,說明本身這備庫就有問題
dsolve('Dg=a*(c/(v0+r*t))-d*g','g(0)=g0')
ans =
g0*exp(-d*t) + exp(-d*t)*int((a*c*exp(d*x))/(v0 + r*x), x == 0..t, IgnoreAnalyticConstraints)