您的位置:首页 > 其它

Duplicating a controlfile into ASM when original controlfile is stored on ASM

2011-07-18 11:11 525 查看
应客户要求要给某个库再增加一个control file,当前的控制文件放在ASM磁盘组上,数据库版本为10.2.0.5。引用metalink文章[ID 345180.1]内容:
If using spfile to start the instance:
1. Modify the spfile specifically the parameter control_files. In this example, a second controlfile
is going to be created on same diskgroup DATA1.sql> alter system set control_files='+DATA1/v102/controlfile/current.261.637923577','+DATA1'
scope=spfile sid='*';
2. Start the instance in NOMOUNT mode.
3. From rman, duplicate the controlfile $ rman nocatalog
RMAN>connect target
RMAN> restore controlfile from '+DATA1/v102/controlfile/current.261.637923577';
The output for the execution is like:
Starting restore at 08-NOV-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 instance=V1021 devtype=DISK
channel ORA_DISK_1: copied control file copy
output filename=+DATA1/v102/controlfile/current.261.637923577
output filename=+DATA1/v102/controlfile/current.269.638120375
Finished restore at 08-NOV-07
Note that the command prints the name of the new created file: +DATA1/v102/controlfile/current.269.638120375
4. Mount and Open the databaseRMAN> sql 'alter database mount';
RMAN> sql 'alter database open';
5. Validate both controlfiles are presentSQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
+DATA1/v102/controlfile/current.261.637923577
+DATA1/v102/controlfile/current.269.638120375
6. Modify the control_file parameter with the complete path of the new file:sql> alter system set control_files='+DATA1/v102/controlfile/current.261.637923577','+DATA1/v102/controlfile/current.269.638120375'
scope=spfile sid='*';
Next time instance are restarted, will pick both files.

When using init.ora file:
1) Edit init.ora and add new disk group name or same disk group name for mirroring controlfiles.
Example:
control_files=('+GROUP1','+GROUP2')
(2) Start the instance in NOMOUNT mode.
(3) Execute restore command, to duplicate the controlfile using the original location. Presuming, your current controlfile location DISK path is '+data/V10G/controlfile/Current.260.605208993' , execute:RMAN> restore controlfile from '+data/V10G/controlfile/Current.260.605208993';
Starting restore at 29-APR-05
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=317 devtype=DISK
channel ORA_DISK_1: copied controlfile copy
output filename=+GROUP2/v10g/controlfile/backup.268.7
output filename=+GROUP2/v10g/controlfile/backup.260.5
Finished restore at 29-APR-05
(4) Mount and open the database:RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> alter database open;
database opened
RMAN> exit
(5) Verify new mirrored controlfiles via sqlplusSQL> show parameter control_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +GROUP2/v10g/controlfile/backup.268.7, +GROUP2/v10g/controlfile/backup.260.5
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐