043-192

192: You want to migrate your existing non-ASM files to ASM files for the
database PROD. Which method or command would you use to accomplish this
task? (Choose all that apply.)
A.the CONVERT command of RMAN
B.Data Pump Export and Import into the same database
C.conventional export and import into the same database
D.the BACKUP DATABASE and RESTORE DATABASE commands of RMAN
E.the BACKUP AS COPY DATABASE and SWITCH DATABASE TO COPY command of RMAN
Answer: AE
1. First need to set below parameter for controlfile,datafile or FRA.
NOTE: I have two disk group here I am using "DGRP2" disk group.
SQL> alter system set control_files='+DGRP2' scope=spfile;
SQL> alter system set db_create_file_dest='+DGRP2' scope=spfile;
SQL> alter system set db_recovery_file_dest='+DGRP2' scope=spfile;
Step: 2 Restart DB server to take above parameter value.
SQL> shutdown immediate;
SQL> startup nomount
Step:3 Connect with RMAN session & restore controlfile on ASM system.
C:\>RMAN target=sys
RMAN> restore controlfile from 'C:\app\m.taj\oradata\test\CONTROL01.ctl';
RMAN> alter database mount;
RMAN> backup as copy database format '+DGRP2';
RMAN> switch database to copy;
Step:5 Again connect to sqlplus session and perform. incomplete recovery
C:\>sqlplus sys/oracle as sysdba
SQL> recover database using backup controlfile until cancel;
Step:6 OPEN database with RESETLOGS option.
SQL> alter database open resetlogs;
Step:7 Drop old tempfile and create new tempfile in existing temp tablespace
SQL> alter database tempfile 'c:\app\m.taj\oradata\test\temp01.dbf' 2 drop including
datafiles;
SQL> alter tablespace temp add tempfile size 512m 2 autoextend on next 250m maxsize unlimited;
SQL> select tablespace_name, file_name, bytes from dba_temp_files;
Step:8 Recreate All redolog group on ASM diskgroup
SQL> select a.group#, a.member, b.bytes
from v$logfile a, v$log b where a.group# = b.group#;
SQL> select group#,status from v$log;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> select group#,status from v$log;
SQL> alter database drop logfile group 1;
alter database drop logfile group 1*ERROR at line 1:ORA-01624: log 1 needed for crash recovery
of instance test (thread 1)ORA-00312: online log 1 thread 1:
'C:\APP\M.TAJ\ORADATA\TEST\REDO01.LOG'
When you get above error message then set checkpoint with below command.
SQL> alter system checkpoint global;
SQL> alter database drop logfile group 1;
SQL> alter database add logfile group 1 size 10m;
SQL> alter system checkpoint global;
SQL> alter database drop logfile group 2;
SQL> alter database add logfile group 2 size 10m;
SQL> alter system checkpoint global;
SQL> alter database drop logfile group 3;
SQL> alter database add logfile group 3 size 10m;
SQL> column member format a30
SQL> select a.group#, a.member, b.bytes
from v$logfile a, v$log b where a.group# = b.group#;
Step:9 Recreate SPFILE on ASM diskgroup
SQL> create pfile='c:\initTEST.ora' from spfile;
SQL> create spfile='+DGRP2/spfileTEST.ora' from pfile='c:\initTEST.ora';
7. Detele all backup copy from RMAN
RMAN> delete noprompt force copy;

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

转载于:http://blog.itpub.net/11312660/viewspace-718263/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值