ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 043-192

043-192

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-10 12:10:33 0 删除 编辑
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/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 043-191
下一篇: 043-193
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    202990