Recreate stdby Control File When dbf Are On ASM And Using OMF-734862.1

Step By Step Guide On How To Recreate Standby Control File When Datafiles Are On ASM And Using Oracle Managed Files [ID 734862.1]
 

In this Document

Fix

Applies to:

Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.2 [Release 10.1 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 19-APR-2011***


Goal

Step by step guide on how to recreate standby control file when datafiles are on ASM and using Oracle Managed Files (OMF)

In case you may want or need more about your current topic - please also access the Data Guard Community of Customers and Oracle Specialists directly via:
https://communities.oracle.com/portal/server.pt/community/high_availability_data_guard/302

Fix

Below are the steps to accomplish the task :

Step 1: Create the Standby control file on primary database
Step 2: Copy the controlfile backup to the standby system
Step 3: Shutdown, restore, rename.

Example

Step 1 : Create the Standby control file on primary database.

$ export ORACLE_SID=DEL
$rman target /
RMAN> backup current controlfile for standby format 'stdbyctl.bkp';
RMAN> EXIT;

stdbyctl.bkp file will be created in "$ORACLE_HOME/dbs" (Unix) or "$ORACLE_HOME/database" (Windows).

Step 2. Copy the controlfile backup to the standby system

Using ftp/scp move stdbyctl.bkp to standby system

Step 3: Shutdown, restore, rename.

A. Shutdown all instances of the standby.

$ export ORACLE_SID=MUM
$sqlplus / as sysdba
SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.

B. Depending on the location of the logfiles on the standby server remove all online and standby redo logs from the standby directories Using an Operating System utility or ASMCMD and make sure that you have the LOG_FILE_NAME_CONVERT parameter defined to translate any directory paths.

C. Startup one instance of Standby database in nomount stage:

$sqlplus / as sysdba
SQL> startup nomount
ORACLE instance started.

Total System Global Area 209715200 bytes
Fixed Size 1248116 bytes
Variable Size 75498636 bytes
Database Buffers 125829120 bytes
Redo Buffers 7139328 bytes

D. Connect to RMAN with nocatalog option and Restore the standby control file:

$rman nocatalog target /
RMAN> restore standby controlfile from '\tmp\stdbyctl.bkp';

Starting restore at 29-AUG-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:17
output filename=+DATA1/del/controlfile/current.257.661096899
Finished restore at 29-AUG-08

E. Mount standby database

RMAN> alter database mount;

database mounted

F. Catalog the datafiles of standby database

Below command will give you a list of files and ask if they should all be catalog. Review the list and say YES if all the datafiles are properly listed
In below command while cataloging the files, the string specified should refer to the diskgroup/filesystem destination of the standby data files.

RMAN> catalog start with '+DATA1/MUM/DATAFILE/';

Starting implicit crosscheck backup at 29-AUG-08
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
Crosschecked 10 objects
Finished implicit crosscheck backup at 29-AUG-08

Starting implicit crosscheck copy at 29-AUG-08
using channel ORA_DISK_1
Finished implicit crosscheck copy at 29-AUG-08

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +fra/MUM/BACKUPSET/2008_07_28/nnndf0_TAG20080728T113319_0.296.661260801
File Name: +fra/MUM/BACKUPSET/2008_07_28/ncsnf0_TAG20080728T113319_0.297.661260847
File Name: +fra/MUM/CONTROLFILE/backup.272.661096103

searching for all files that match the pattern +DATA1/MUM/DATAFILE/

List of Files Unknown to the Database
=====================================
File Name: +data1/MUM/DATAFILE/SYSTEM.258.661097855
File Name: +data1/MUM/DATAFILE/SYSAUX.259.661097855
File Name: +data1/MUM/DATAFILE/UNDOTBS1.260.661097855
File Name: +data1/MUM/DATAFILE/USERS.261.661097855

Do you really want to catalog the above files (enter YES or NO)? YES
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +data1/MUM/DATAFILE/SYSTEM.258.661097855
File Name: +data1/MUM/DATAFILE/SYSAUX.259.661097855
File Name: +data1/MUM/DATAFILE/UNDOTBS1.260.661097855
File Name: +data1/MUM/DATAFILE/USERS.261.661097855

NOTE:
a) This will only work if you are using OMF. If you are using ASM without OMF you have to catalog all non-OMF Datafiles as Datafile Copies manually using

RMAN> catalog datafilecopy '';

b) If you have Datafiles on different Diskgroups you have to catalog from all Diskgroups, of course.


G. Commit the changes to the controlfile

RMAN> switch database to copy;

datafile 1 switched to datafile copy "+DATA1/mum/datafile/system.258.661097855"
datafile 2 switched to datafile copy "+DATA1/mum/datafile/undotbs1.260.661097855"
datafile 3 switched to datafile copy "+DATA1/mum/datafile/sysaux.259.661097855"
datafile 4 switched to datafile copy "+DATA1/mum/datafile/users.261.661097855"

RMAN> EXIT;

H. Re-enable flashback on the standby database.
$sqlplus / as sysdba
SQL> alter database flashback off;

Database altered.

SQL> alter database flashback on;

Database altered.

I. Query v$log and clear all online redo log groups

SQL> select group# from v$log;

GROUP#
----------
1
2
3

SQL> alter database clear logfile group 1;

Database altered.

SQL> alter database clear logfile group 2;

Database altered.

SQL> alter database clear logfile group 3;

Database altered.

J. Query v$standby_log and clear all standby redo logs

SQL> select group# from v$standby_log;

GROUP#
----------
4
5
6

SQL> alter database clear logfile group 4;

Database altered.

SQL> alter database clear logfile group 5;

Database altered.

SQL> alter database clear logfile group 6;

Database altered.

Recreate the standby redo logs on standby database if standby redo logs are not present on the primary.

SQL> select group# from v$standby_log;

no row selected

SQL> alter database add standby logfile group 4 size 50m;

Database altered.

SQL> alter database add standby logfile group 5 size 50m;

Database altered.

SQL> alter database add standby logfile group 6 size 50m;

Database altered.

K. Start Managed recovery process on standby

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL> exit


References

NOTE:1514588.1 - Data Guard Physical Standby - Managing temporary tablespace tempfiles
NOTE:740675.1 - Online Redo Logs on Physical Standby

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17252115/viewspace-764865/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/17252115/viewspace-764865/

RMAN catalog和switch参数解读 RMAN catalog和switch参数解读backup as copy概念catalogcatalog datafilecopy注意点catalog start with注意点:catalog backuppiececatalog archivelog总结SWITCH 以前一直用backuppiece即备份集的方式,因为backup默认不加参数就为backuppiece。今天客户需要使用datafilecopy,没想到翻车了,对此形式的备份恢复不是很熟悉,特此做以实验测试。 backup as copy 阅读详情

相关推荐

ORACLE之RMAN恢复

ORACLE之RMAN恢复 指定备份路径: RMAN> catalog start with ‘/u01/app/oracle/rman/inc’; 一、完全恢复 完全恢复:从上次备份后,归档日志,redo日志,控制文件等都不丢失的情况,恢复后数据完全不丢失,称为完全恢复。 数据文件全部丢失: 执行恢复: [oracle@MiWiFi-R4CM-srv inc]$ rman target / nocatalog Recovery Manager: Release 12.2.0.1.0 -

XiaoHG_CSDN的博客 1004

oracle catalog start with,RMAN - catalog start with命令

catalog start with 是一个很好的命令. 有了这个命令后, 基本上可以不再使用catalog数据库了 . 因为可以通过这个命令将以前的备份集信息重新导入到当前控制文件中, 一般应用于使用rman恢复, 控制文件又是旧的或者是手工创建的(这样的控制文件当然没有最新的备份集的信息), 通过catalog start with 可以将最新的备份集以及归档日志文件列表导入到控制文中...

weixin_35906864的博客 1885

catalog start with

oracle10g 中rman的增强功能catalog start with,通过这个命令将以前的备份集信息重新导入到当前控制文件中,一般应用于使用rman恢复,控制文件又是旧的或者是手工创建的(这样的控制文件当然没有最新的备份集的信息),通过catalog start with 可以将最新的备份集以及归档日志文件列表导入到控制文中,然后就可以进行rman的恢复了。         Orac

dba成长之路 8514

【OCP学习1z0-053记录67】catalog start with

337.YouhavelostallyourRMANbackupsetpiecesduetoadiskfailure.Unfortunately,youhaveanautomatedcross-checkscriptthatalsodoesadeleteexpiredbackupsetcommand.Youhaverestoredal...

viviliving的专栏 938

catalog start with rman备份集直接导入控制文件中

catalog start with 是一个很好的命令. 有了这个命令后, 基本上可以不再使用catalog数据库了 . 因为可以通过这个命令将以前的备份集信息重新导入到当前控制文件中, 一般应用于使用rman恢复, 控制文件又是旧的或者是手工创建的(这样的控制文件当然没有最新的备份集的信息), 通过catalog start with 可以将最新的备份集以及归档...

weixin_33829657的博客 188

CATALOG START WITH 的使用

注册归档日志: catalog archivelog '/u01/oracle/arch_1.dbf';把备份片注册到控制文:catalog backuppiece '/backup/hfzcdb/hfzcdb_arch_25_1_1134482433'; 注册目录(多用于批量注册归档,也可以用于注册备份片)CATALOG START WITH '/backup/full'; catalog start with 将以前的备份集信息重新导入到当前控制文件中 通过catalog start with 可以

TEST_ID_KING的博客 277

oracle catalog start with,catalog start with报错,求解

RMAN> catalog start with '/archive1/';using target database control file instead of recovery catalogsearching for all files that match the pattern /archive1/List of Files Unknown to the Database===...

weixin_36078737的博客 1075

OCP-1Z0-053-V12.02-337题

337.You have lost all your RMAN backup set pieces due to a disk failure. Unfortunately, you have an automated cross-check script that also does a delete expired backupset command. You have restored a

一抹曦阳-Oracle 5646

oracle catalog start with,rman中进行catalog start with 无法注册部分备份文件

/oracle 目录为单独挂载的分区,损坏后无法访问该目录。有一些rman备份存在,准备用备份恢复。1、/oracle 分区的问题相关人员说是硬盘损坏,已经更换一个盘。印象中raid5 自动恢复数据,文件系统访问也不会受到影响。但目前看,该分区没法挂载,parted 里看到也是有问题2、重新格式化sdb1分区,挂载到/oracle,安装Oracle软件。3、查看rman备份,1111日存在0级...

weixin_28727943的博客 829

ORACLE11g RMAN使用

1.RMAN备份与恢复概述 2.使用RMAN 3.在归档和非归档模式下备份数据库 4.使用list-report命令 5.热备与冷备-联机与脱机备份-备份集-备份片 6.使用crosscheck命令-手工注册备份集|归档日志 7.使用validate验证数据库 8.delete-obsolete 9.备份spfile-控制文件-归档文件-映像副本10.configure-set 一、RMAN备份与恢复概述 RMAN(Recovery Manager)恢复管理器,它是一种oracle的专用备份恢复工具。是一种

weixin_43322993的博客 1164

catalog start with 和 catalog backuppiece

使用rman恢复时,可以用catalog backuppiece将备份文件单个单个的让rman识别到,也可以用catalog start  with 将整个目录添加到rman里。比如rman恢复后,添加归档日志 RMAN> catalog backuppiece '/rmanbackup/archive_log_full.bak'; 恢复/rmanbackup下的一个文件,如果要加进去很多归

huoshuyinhua的专栏 2831

10g 特性: catalog start with 将RMAN备份集恢复到另一台机器

catalog start with 将RMAN备份集恢复到另一台机器 oracle10g 中rman的增强功能catalog start with 将备份集注册到控制文件 1.prepare ser...

331

oracle catalog start with,catalog start with rman备份集直接导入控制文件中

catalog start with 是一个很好的命令. 有了这个命令后,基本上可以不再使用catalog数据库了 . 因为可以通过这个命令将以前的备份集信息重新导入到当前控制文件中,一般应用于使用rman恢复,控制文件又是旧的或者是手工创建的(这样的控制文件当然没有最新的备份集的信息),通过catalog start with可以将最新的备份集以及归档日志文件列表导入到控制文中,然后就可...

weixin_39605894的博客 538

053试题 337 - catalog start with

题目: 337.You have lost all your RMAN backup set pieces due to a disk failure. Unfortunately, you have an automated cross-check script that also does a delete expired backupset command. You have restor...

文档搬运工 672

rman备份中的 catalog start with 的使用??

最近在看rman,对rman的使用中看到 catalog start with 的使用。对这个不是很清楚,所以问问: catalog start with 什么时候用呢? 我用了 controlfile启动到m...

cuibi2350的博客 895

RMAN - catalog start with命令

catalog start with 是一个很好的命令. 有了这个命令后, 基本上可以不再使用catalog数据库了 . 因为可以通过这个命令将以前的备份集信息重新导入到当前控制文件中, 一般应用于使用rman恢复, 控制文...

cuixie2370的博客 442

12c】12c RMAN新特性之通过网络远程恢复数据库(RESTORE/Recover from Service)

12c】12c RMAN新特性之通过网络远程恢复数据库(RESTORE/Recover from Service) 通过网...

coco3600的博客 1456

物理standby上的online redo log在被置为managed standby时报错

物理备库上的online redo log在被置为managed standby时报错 当standby切换为primary时,需要clearonline redo。但在10.2版本上的standb...

coke0078的博客 478
上一篇: Data Guard Gap Detection and Resolution Possibilties [ID 1537316.1]
下一篇: MAA - Creating a RAC Physical Standby for a RAC Primary [ID 380449.1]
cuilian2013
博客等级 码龄10年 4粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值