Restore standby database controlfile in ASM (refreshing standby controlfile)
If your standby database uses ASM and you need to refresh the standby
controlfile, how do you do this? How do you get the new standby
controlfile into ASM?
We use RMAN for this.
First you need to create a new standby controlfile on the primary database using the command:
SQL>alter database create standby controlfile as '/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl' reuse;
This file (/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl) is then copied to the standby server.
On the standby server start the standby database in nomount mode:
[oracle@dbvrac1 tmp]$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 29 21:39:29 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 335544320 bytes
Fixed Size 1219280 bytes
Variable Size 109053232 bytes
Database Buffers 222298112 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Production
With the Real Application Clusters option
Then start RMAN and restore the standby controlfile from the file system into ASM. In this case there are 2 controlfiles:
[oracle@dbvrac1 tmp]$ rman
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 29 21:41:20 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> connect target
connected to target database: dbvrac (not mounted)
RMAN> restore controlfile to '+DATA/DBVRAC/controlfile/Current.256.645671167' from '/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl';
Starting restore at 29-JUL-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 instance=dbvrac1 devtype=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 29-JUL-09
RMAN> restore controlfile to '+DATA/DBVRAC/controlfile/Current.257.645671169' from '/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl';
Starting restore at 29-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: copied control file copy
Finished restore at 29-JUL-09
RMAN>
Completed. The standby controlfiles have been refreshed and the standby database can be used again.
come from:
We use RMAN for this.
First you need to create a new standby controlfile on the primary database using the command:
SQL>alter database create standby controlfile as '/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl' reuse;
This file (/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl) is then copied to the standby server.
On the standby server start the standby database in nomount mode:
[oracle@dbvrac1 tmp]$ sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 29 21:39:29 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 335544320 bytes
Fixed Size 1219280 bytes
Variable Size 109053232 bytes
Database Buffers 222298112 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - Production
With the Real Application Clusters option
Then start RMAN and restore the standby controlfile from the file system into ASM. In this case there are 2 controlfiles:
[oracle@dbvrac1 tmp]$ rman
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jul 29 21:41:20 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> connect target
connected to target database: dbvrac (not mounted)
RMAN> restore controlfile to '+DATA/DBVRAC/controlfile/Current.256.645671167' from '/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl';
Starting restore at 29-JUL-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 instance=dbvrac1 devtype=DISK
channel ORA_DISK_1: copied control file copy
Finished restore at 29-JUL-09
RMAN> restore controlfile to '+DATA/DBVRAC/controlfile/Current.257.645671169' from '/usr/tmp/X.dbvisit.20010.dbvrac1.standbycontrolfile.ctl';
Starting restore at 29-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: copied control file copy
Finished restore at 29-JUL-09
RMAN>
Completed. The standby controlfiles have been refreshed and the standby database can be used again.
come from:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-710449/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rman restore database(spfile,controlfile, datafile)RESTDatabase
- ora-01666 controlfile is for a standby database 問題記錄Database
- restore controlfile from autobackREST
- Controlfile備份恢復關於Standby的理解
- standby databaseDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Physical Standby Database 切換到 Snapshot Standby DatabaseDatabase
- How to Create or Remove Restore Point on Standby database (文件 ID 1672977.1)REMRESTDatabase
- Standby Database ---09Database
- standby database to primary database.Database
- recover database using backup controlfileDatabase
- standby database No RFS 程式Database
- Rman backup standby databaseDatabase
- Standby Database for reportDatabase
- recover database using backup controlfile理解Database
- Controlfile和system01資料檔案丟失的恢復(透過standby)
- Create RAC Standby Database for RAC Primary DatabaseDatabase
- Standby Database的工作原理Database
- 建立 Logical Standby DatabaseDatabase
- manage logical standby databaseDatabase
- How a Standby Database Is Mounted (295)Database
- 如何給asm管理的db映象controlfileASM
- recover database until cancel using backup controlfileDatabase
- Recover database using backup controlfile until cancelDatabase
- alter database backup controlfile to trace的問題Database
- alter database backup controlfile to trace的含義Database
- rman_restore controlfile_and_autobackup之關係測試REST
- 重建控制檔案--alter database backup controlfile to traceDatabase
- oracle create a new database using backup controlfile to traceOracleDatabase
- recover database using backup controlfile與 recover database 的區別Database
- Setup Standby Database on One PC(轉)Database
- Oracle DG Standby Database型別OracleDatabase型別
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- Creating a Physical Standby DatabaseDatabase
- rman 建 Standby Database 筆記Database筆記
- (轉)Standby Database的工作原理Database
- 監控Logical standby databaseDatabase
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase