如何复制控制文件在ASM实例存储

本文介绍如何在ASM实例的环境下,去复制2个控制文件的过程。

如果在文件系统,相对比较简单了。


##Make sure db is in the archived mode

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +ARCH_01/t/
Oldest online log sequence 24
Next log sequence to archive 25
Current log sequence 25

##Make sure all of online redo is done backup
alter system switch logfile;
...

## If you are using spfile parameter file ,please convert it to pfile first

create pfile='/u01/app/oracle/initt.ora' from spfile='+ARCH_01/t/spfilet.ora';

## Backup controlfile in mount stage
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount
ORACLE instance started.
Total System Global Area 1191182336 bytes
Fixed Size 2072288 bytes
Variable Size 318767392 bytes
Database Buffers 855638016 bytes
Redo Buffers 14704640 bytes
Database mounted.


alter database backup controlfile to '/u01/app/oracle/test_ctl.ctl';

##Edit the parameter: controlfile in the pfile
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string +DATA_01/t/controlfile/current
.285.640542545, +DATA_01/t/con
trolfile/current.286.640542545
## Duplicate controlfile from file system to ASM instance
SQL> startup nomount pfile=/u01/app/oracle/initt1.ora
ORACLE instance started.

Total System Global Area 1191182336 bytes
Fixed Size 2072288 bytes
Variable Size 318767392 bytes
Database Buffers 855638016 bytes
Redo Buffers 14704640 bytes

$ ./rman target /

Recovery Manager: Release 10.2.0.3.0 - Production on Fri Dec 7 11:54:15 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: t (not mounted)

RMAN> restore controlfile from '/u01/app/oracle/test_ctl.ctl';

Starting restore at 12/07/2007 11:54:33
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK

channel ORA_DISK_1: copied control file copy
output filename=+DATA_01/t/controlfile/test_ctl01
output filename=+DATA_01/t/controlfile/test_ctl02
Finished restore at 12/07/2007 11:54:41


SQL> startup nomount pfile=/u01/app/oracle/initt1.ora

alter database open resetlogs;

 转载自:http://jack2k.itpub.net/post/9350/427659

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

转载于:http://blog.itpub.net/22664653/viewspace-662823/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值