RMAN學習筆記_ Duplicate重做DataGuard
利用Duplicate重做DataGuard
參考文件<>
ENV:
Oracle9i + Suse9 + DataGuard + 預設的最大效能模式
Primary: 192.168.1.101
standby: 192.168.1.102
Primary 到 standby的 DataGuard出現Gap,且Primary 上的歸檔已刪除,沒備份:
SQL> select * from v$archive_gap;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 18 21
之前的Dataguard是用冷備形式建立的.現在要重建
唯一的解決方法,重做DataGuard,利用Duplicate 來重做
解決過程:
1 在Primary生成全備(Primary)
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/backup/backup_%d_%T_%s_%p';
BACKUP DATABASE
INCLUDE CURRENT CONTROLFILE FOR STANDBY
PLUS ARCHIVELOG;
2 將備份檔案傳到備端(Primary)
或透過NFS不用手動傳,實質一樣,在應用的時候傳
參考<
scp oracle@192.168.1.101:/u01/backup/backup_MYDB_20100203_19_1 /u01/backup/
scp oracle@192.168.1.101:/u01/backup/backup_MYDB_20100203_20_1 /u01/backup/
scp oracle@192.168.1.101:/u01/backup/backup_MYDB_20100203_21_1 /u01/backup/
注意:在將備份檔案複製到Standby上時,存放備份檔案的目錄必須與Primary備份檔案所在的目錄結構一樣,
這樣控制檔案才能找到備份檔案
3 啟動備端例項到Standby形式的nomount狀態
先關閉再重啟
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
shutdown immediate
startup nomount;
4 在Primary 重新Duplicate 應用備份
rman target / auxiliary
RUN
{
# If desired, issue a SET command to terminate recovery at a specified point.
# SET UNTIL SCN 143508;
DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK
DORECOVER;
}
> rman target / auxiliary
Recovery Manager: Release 9.2.0.4.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: MYDB (DBID=2621354619)
connected to auxiliary database: mydb (not mounted)
RMAN> RUN
2> {
3> # If desired, issue a SET command to terminate recovery at a specified point.
4> # SET UNTIL SCN 143508;
5> DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK
6> DORECOVER;
7> }
............
............
Recovery Manager complete.
順利完成
5 Duplicate 完成後Standby只處於正常的Mount狀態.應開啟Recover
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
6 在Standby端查詢Gap
SQL> select * from v$archive_gap;
no rows selected
成功解決
7 碰到的問題:
rman target / auxiliary
報錯:
> rman target / auxiliary
Recovery Manager: Release 9.2.0.4.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: MYDB (DBID=2621354619)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04006: error from auxiliary database: ORA-12519: TNS:no appropriate service handler found
靜態監聽器的問題
確保你能在Primary 上 sqlplus " as sysdba"可以連通
在我的環境裡,因為在192.168.1.102上已有了另一套DataGuard的Standby.已註冊了名為LISTENER,埠為1521的靜態監聽器.
解決方案:註冊兩個監聽器.
更改後的Listener.ora檔案.
#$ORACLE_HOME/network/admin/listener.ora
SID_LIST_LISTENER_MYDB =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME =/opt/oracle/product/9ir2)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = mydb)
(ORACLE_HOME =/opt/oracle/product/9ir2)
(SID_NAME = mydb)
)
)
LISTENER_MYDB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.102)(PORT = 1521))
)
)
)
SID_LIST_LISTENER_DUPDB =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/9ir2)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = dupdb)
(ORACLE_HOME = /opt/oracle/product/9ir2)
(SID_NAME = dupdb)
)
)
LISTENER_DUPDB =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.102)(PORT = 1522))
)
)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-626766/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN學習筆記_ Duplicate建立DataGuard筆記
- ORACLE dataguard學習筆記Oracle筆記
- RMAN DUPLICATE建立DataGuard物理備庫
- 續rman學習筆記筆記
- 【DATAGUARD 學習】使用duplicate 建立物理standby 資料庫資料庫
- 通過 rman duplicate 配置Oracle 11g Active DataguardOracle
- SG學習筆記之RMAN簡單歸納筆記
- rman資料備份恢復學習筆記筆記
- RMAN學習記錄
- 使用RMAN DUPLICATE...FROM ACTIVE DATABASE命令來建立DataGuard物理備庫Database
- RMAN duplicate databaseDatabase
- RMAN學習筆記_Catalog 安裝與御載筆記
- 【RMAN】使用RMAN的Duplicate功能建立物理DataGuard報錯(ORA-17627、ORA-17629)處理
- oracle實驗記錄Rman duplicate database(1)OracleDatabase
- oracle實驗記錄Rman duplicate database 2OracleDatabase
- numpy的學習筆記\pandas學習筆記筆記
- RMAN筆記筆記
- dataguard讀書筆記筆記
- IT學習筆記筆記
- 學習筆記筆記
- 7.管理重做日誌(筆記)筆記
- 續上_加深學習oracle10g_rman duplicate相關skip選項Oracle
- 【DATAGUARD 學習】學習DATAGUARD 過程中遇到的問題
- 通過rman duplicate database!Database
- RMAN duplicate On Windows7Windows
- 【學習筆記】數學筆記
- 《JAVA學習指南》學習筆記Java筆記
- RMAN Duplicate Database 的學習與測試_20100129Database
- Elasticsearch學習筆記Elasticsearch筆記
- Scala學習筆記筆記
- MySql學習筆記MySql筆記
- jQuery 學習筆記jQuery筆記
- react學習筆記React筆記
- 學習筆記(4.3)筆記
- 學習筆記(4.4)筆記
- 學習筆記(3.29)筆記
- 學習筆記(4.1)筆記
- AOP學習筆記筆記