How To Restore 12cR1DB to New Host File System using RMAN(一)

yyp2009發表於2014-05-29

oracle 12cr1 異機恢復;

oracle 12cr1備份目前nbu不支援,所以主機寫sh包含rman,然後放到crontab裡變定期跑備份到本地檔案目錄;

[root@uccpdb2 scripts]# cat backup_arc.sh
#!/bin/sh
su - oracle << EOF
rman target / cmdfile=/bak/orabakdata/scripts/archive.rcv log=/bak/orabakdata/scripts/archbackup.log append
[root@uccpdb2 scripts]# cat backup_db.sh
#!/bin/sh
su - oracle << EOF
rman target / cmdfile=/bak/orabakdata/scripts/full.rcv log=/bak/orabakdata/scripts/fullbackup0.log append
[root@uccpdb2 scripts]#
 
[root@uccpdb2 scripts]# cat backup_arc.sh
#!/bin/sh
su - oracle << EOF
rman target / cmdfile=/bak/orabakdata/scripts/archive.rcv log=/bak/orabakdata/scripts/archbackup.log append
[root@uccpdb2 scripts]# cat backup_db.sh
#!/bin/sh
su - oracle << EOF
rman target / cmdfile=/bak/orabakdata/scripts/full.rcv log=/bak/orabakdata/scripts/fullbackup0.log append


nbu只需把檔案目錄拉到帶庫。

恢復測試環境只需要用把備份檔案目錄拉到測試機儲存裡後實施恢復。

1 恢復引數檔案並適當修改引數:
#RUN
#{
#  allocate channel c1 type disk format '/data01/bak/%d_%T_%U.bak';
#  SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/data01/bak/%F';
#  RESTORE SPFILE
#    TO PFILE '/u01/app/oracle/product/12.1.0/db_1/dbs/initprod12c.ora'
#    FROM AUTOBACKUP;
#  SHUTDOWN ABORT;
#}
#
#
# restore spfile to pfile '/u01/app/oracle/product/12.1.0/db_1/dbs/initprd12cdb1.ora' from '/bak/orabakdata/controlfile/controlc-3299715205-20140528-00';
#

RUN
{
  allocate channel c1 type disk format '/data01/bak/controlfile/%d_%T_%U.bak';
  SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/data01/bak/controlfile/%F';
  restore spfile to pfile '/u01/app/oracle/product/12.1.0/db_1/dbs/initprd12cdb1.ora' from '/data01/bak/controlfile/controlc-3299715205-20140528-00';
  release channel c1;
}

prd12cdb1.__data_transfer_cache_size=0
prd12cdb1.__data_transfer_cache_size=0
prd12cdb1.__db_cache_size=33554432000
prd12cdb1.__db_cache_size=33285996544
prd12cdb1.__java_pool_size=536870912
prd12cdb1.__java_pool_size=536870912
prd12cdb1.__large_pool_size=671088640
prd12cdb1.__large_pool_size=671088640
prd12cdb1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
prd12cdb1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
prd12cdb1.__pga_aggregate_target=13555990528
prd12cdb1.__pga_aggregate_target=13555990528
prd12cdb1.__sga_target=40667971584
prd12cdb1.__sga_target=40667971584
prd12cdb1.__shared_io_pool_size=536870912
prd12cdb1.__shared_io_pool_size=536870912
prd12cdb1.__shared_pool_size=5100273664
prd12cdb1.__shared_pool_size=5368709120
prd12cdb1.__streams_pool_size=0
prd12cdb1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/prd12cdb/adump'
*.audit_trail='none'
*.background_core_dump='partial'
*.backup_tape_io_slaves=FALSE
*.bitmap_merge_area_size=1048576
*.cell_offload_processing=TRUE
*.cluster_database=true
*.compatible='12.1.0.0.0'
*.control_files='/data01/current.261.844530693','/data01/current.256.844530693'
*.db_block_size=8192
*.db_create_file_dest='/data01'
*.db_create_online_log_dest_1='/data01'
*.db_create_online_log_dest_2='/data01'
*.db_domain=''
*.db_files=8192
*.db_flashback_retention_target=1440
*.db_name='prd12cdb'
*.db_recovery_file_dest='/data01'
*.db_recovery_file_dest_size=2047m
*.db_writer_processes=8
*.dbwr_io_slaves=0
*.ddl_lock_timeout=0
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=prd12cdbXDB)'
*.enable_pluggable_database=true
prd12cdb1.instance_number=2
prd12cdb1.instance_number=1
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=12900m
*.processes=8192
*.remote_login_passwordfile='exclusive'
*.sessions=9016
*.sga_target=38700m
prd12cdb1.thread=2
prd12cdb1.thread=1
prd12cdb1.undo_tablespace='UNDOTBS2'
prd12cdb1.undo_tablespace='UNDOTBS1'
cluster_database=false

2 nomount庫恢復控制檔案;

RUN
{
  allocate channel c1 type disk format '/data01/bak/controlfile/%d_%T_%U.bak';
  SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/data01/bak/controlfile/%F';
   RESTORE CONTROLFILE FROM '/data01/bak/controlfile/controlc-3299715205-20140528-00';
  release channel c1;
}
 


RUN
{
  allocate channel c1 type disk format '/data01/bak/%d_%T_%U.bak';
   RESTORE CONTROLFILE FROM '/data01/bak/controlc-3377887405-20140526-00';
   release channel c1;
}

3 mount庫註冊備份集,恢復庫:
RUN
{
  # allocate a channel to the tape device
    allocate channel c1 type disk format '/data01/bak/bak/%d_%T_%U.bak';
      allocate channel c2 type disk format '/data01/bak/bak/%d_%T_%U.bak';
        allocate channel c3 type disk format '/data01/bak/bak/%d_%T_%U.bak';
  # rename the data files and online redo logs
  set newname for database to '/data01/%f.dbf';
  # Do a SET UNTIL to prevent recovery of the online logs
  set until time "to_date('05/28/2014 17:00:00','mm/dd/yyyy hh24:mi:ss')";
  # restore the database and switch the data file names
  RESTORE DATABASE;
  SWITCH DATAFILE ALL;
  # recover the database
  RECOVER DATABASE;
       release channel disk1;
   release channel disk2;
   release channel disk3;
}

 

RUN
{
  # allocate a channel to the tape device
     allocate channel disk1 type disk format '/data01/bak/d-%T-%t-%s-%p.dbf';
   allocate channel disk2 type disk format '/data01/bak/d-%T-%t-%s-%p.dbf';
   allocate channel disk3 type disk format '/data01/bak/d-%T-%t-%s-%p.dbf';
   allocate channel disk4 type disk format '/data01/bak/d-%T-%t-%s-%p.dbf';
   allocate channel disk5 type disk format '/data01/bak/d-%T-%t-%s-%p.dbf';
   allocate channel disk6 type disk format '/data01/bak/d-%T-%t-%s-%p.dbf';
  # rename the data files and online redo logs
  # set newname for database to '/data01/%U.dbf';
  # Do a SET UNTIL to prevent recovery of the online logs
  set until time "to_date('05/26/2014 15:00:00','mm/dd/yyyy hh24:mi:ss')";
  # restore the database and switch the data file names
  #RESTORE DATABASE;
  #SWITCH DATAFILE ALL;
  # recover the database
  RECOVER DATABASE;
     release channel disk1;
   release channel disk2;
   release channel disk3;
   release channel disk4;
   release channel disk5;
   release channel disk6;
}

最終引數檔案如下:
prod12c.__data_transfer_cache_size=0
prod12c.__db_cache_size=3925868544
prod12c.__db_cache_size=4362076160
prod12c.__java_pool_size=67108864
prod12c.__java_pool_size=67108864
prod12c.__large_pool_size=100663296
prod12c.__large_pool_size=100663296
prod12c.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
prod12c.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
prod12c.__pga_aggregate_target=3388997632
prod12c.__sga_target=10099884032
prod12c.__sga_target=10099884032
prod12c.__shared_io_pool_size=536870912
prod12c.__shared_io_pool_size=536870912
prod12c.__shared_pool_size=5402263552
prod12c.__shared_pool_size=4966055936
prod12c.__streams_pool_size=0
prod12c.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/prod12c/adump'
*.audit_trail='NONE'
*.cluster_database=true
*.compatible='12.1.0.0.0'
*.control_files='/data01/current.261.841255533','/data01/current.256.841255533'
*.db_block_size=8192
*.db_create_file_dest='/data01'
*.db_domain=''
*.db_files=8000
*.db_name='prod12c'
*.db_recovery_file_dest='/data01'
*.db_recovery_file_dest_size=322017689600
*.db_writer_processes=4
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=prod12cXDB)'
*.enable_pluggable_database=true
prod12c.instance_number=1
prod12c.instance_number=2
*.log_archive_format='%t_%s_%rCC"ou.dbf'
*.open_cursors=300
*.pga_aggregate_target=3210m
*.processes=4096
*.remote_login_passwordfile='exclusive'
*.sessions=4511
*.sga_target=9630m
prod12c.thread=1
prod12c.undo_tablespace='UNDOTBS1'
*.db_create_online_log_dest_1='/data01'
*.db_create_online_log_dest_2='/data01'

  cluster_database=false

[oracle@orat3 bak]$ cd control
controlc-3377887405-20140526-00  controlfile/                    
[oracle@orat3 bak]$ cd controlfile
[oracle@orat3 controlfile]$ ls
controlc-3299715205-20140528-00
[oracle@orat3 controlfile]$ pwd
[oracle@orat3 controlfile]$ cd ..
[oracle@orat3 bak]$ ls
archivebak                       d-20140525-848449842-263-1.dbf  d-20140525-848449851-274-1.dbf  d-20140525-848449862-285-1.dbf
backupdata                       d-20140525-848449842-264-1.dbf  d-20140525-848449852-275-1.dbf  d-20140525-848449862-286-1.dbf
controlc-3377887405-20140526-00  d-20140525-848449842-265-1.dbf  d-20140525-848449855-276-1.dbf  d-20140525-848449863-287-1.dbf
controlfile                      d-20140525-848449843-266-1.dbf  d-20140525-848449855-277-1.dbf  d-20140525-848449864-288-1.dbf
d-20140525-848449829-256-1.dbf   d-20140525-848449843-267-1.dbf  d-20140525-848449855-278-1.dbf  d-20140525-848449865-289-1.dbf
d-20140525-848449829-257-1.dbf   d-20140525-848449844-268-1.dbf  d-20140525-848449856-279-1.dbf  l-20140525-848449884-291-1.log
d-20140525-848449829-258-1.dbf   d-20140525-848449846-269-1.dbf  d-20140525-848449857-280-1.dbf  l-20140525-848449884-292-1.log
d-20140525-848449829-259-1.dbf   d-20140525-848449846-270-1.dbf  d-20140525-848449857-281-1.dbf  l-20140526-848536215-294-1.log
d-20140525-848449829-260-1.dbf   d-20140525-848449847-271-1.dbf  d-20140525-848449857-282-1.dbf  l-20140526-848536215-295-1.log
d-20140525-848449830-261-1.dbf   d-20140525-848449848-272-1.dbf  d-20140525-848449857-283-1.dbf  l-20140527-848622617-297-1.log
d-20140525-848449838-262-1.dbf   d-20140525-848449848-273-1.dbf  d-20140525-848449858-284-1.dbf  l-20140527-848622617-298-1.log
[oracle@orat3 bak]$ cd backupdata
[oracle@orat3 backupdata]$ ls
d-20140525-848449817-196-1.dbf  d-20140525-848449819-200-1.dbf  d-20140525-848449829-204-1.dbf  d-20140525-848449833-208-1.dbf
d-20140525-848449817-197-1.dbf  d-20140525-848449820-201-1.dbf  d-20140525-848449829-205-1.dbf  d-20140525-848449834-209-1.dbf
d-20140525-848449818-198-1.dbf  d-20140525-848449820-202-1.dbf  d-20140525-848449832-206-1.dbf
d-20140525-848449818-199-1.dbf  d-20140525-848449821-203-1.dbf  d-20140525-848449833-207-1.dbf

[oracle@orat3 backupdata]$
[oracle@orat3 backupdata]$
[oracle@orat3 backupdata]$ pwd
/data01/bak/backupdata
[oracle@orat3 backupdata]$ cd $ORACLE_HOME
[oracle@orat3 db_1]$ ls
addnode     cdata        ctx       deinstall    has            javavm  lib      nls     opmn         owm      QOpatch   root.sh       sqlpatch  usm
apex        cfgtoollogs  cv        demo         hs             jdbc    log      oc4j    oracore      perl     R         scheduler     sqlplus   utl
assistants  clone        dbhadoop  diagnostics  install        jdk     md       odbc    oraInst.loc  plsql    racg      slax          srvm      wwg
bin         crs          dbs       dmu          instantclient  jlib    mgw      olap    ord          plugins  rdbms     sqldeveloper  sysman    xdk
ccr         css          dc_ocm    dv           inventory      ldap    network  OPatch  oui          precomp  relnotes  sqlj          ucp
[oracle@orat3 db_1]$ cd dbs
[oracle@orat3 dbs]$ ls
a  b  hc_luocs12c1.dat  hc_prod12c.dat  initprod12c.ora  kk.ora  lkPROD12C  snapcf_prod12c.f  spfileprod12c.ora
[oracle@orat3 dbs]$ touch initprd12cdb.ora

[oracle@orat3 dbs]$ ls
a  b  hc_luocs12c1.dat  hc_prod12c.dat  initprd12cdb.ora  initprod12c.ora  kk.ora  lkPROD12C  snapcf_prod12c.f  spfileprod12c.ora
[oracle@orat3 dbs]$ cat initprod12c.ora

prod12c.__data_transfer_cache_size=0
prod12c.__db_cache_size=3925868544
prod12c.__db_cache_size=4362076160
prod12c.__java_pool_size=67108864
prod12c.__java_pool_size=67108864
prod12c.__large_pool_size=100663296
prod12c.__large_pool_size=100663296
prod12c.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
prod12c.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
prod12c.__pga_aggregate_target=3388997632
prod12c.__sga_target=10099884032
prod12c.__sga_target=10099884032
prod12c.__shared_io_pool_size=536870912
prod12c.__shared_io_pool_size=536870912
prod12c.__shared_pool_size=5402263552
prod12c.__shared_pool_size=4966055936
prod12c.__streams_pool_size=0
prod12c.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/prod12c/adump'
*.audit_trail='NONE'
*.cluster_database=true
*.compatible='12.1.0.0.0'
*.control_files='/data01/current.261.841255533','/data01/current.256.841255533'
*.db_block_size=8192
*.db_create_file_dest='/data01'
*.db_domain=''
*.db_files=8000
*.db_name='prod12c'
*.db_recovery_file_dest='/data01'
*.db_recovery_file_dest_size=322017689600
*.db_writer_processes=4
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=prod12cXDB)'
*.enable_pluggable_database=true
prod12c.instance_number=1
prod12c.instance_number=2
*.log_archive_format='%t_%s_%rCC"ou.dbf'
*.open_cursors=300
*.pga_aggregate_target=3210m
*.processes=4096
*.remote_login_passwordfile='exclusive'
*.sessions=4511
*.sga_target=9630m
prod12c.thread=1
prod12c.undo_tablespace='UNDOTBS1'
*.db_create_online_log_dest_1='/data01'
*.db_create_online_log_dest_2='/data01'

cluster_database=false

Recovery Manager complete.
[oracle@orat3 dbs]$ export ORACLE_SID=prd12cdb1
[oracle@orat3 dbs]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Thu May 29 10:00:26 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database (not started)

RMAN> set dbid=3299715205;

executing command: SET DBID

RMAN>

RMAN> startup nomount force;

startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/12.1.0/db_1/dbs/initprd12cdb1.ora'

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2296576 bytes
Variable Size                293602560 bytes
Database Buffers             767557632 bytes
Redo Buffers                   5480448 bytes


RMAN> show all;

RMAN configuration parameters for database with db_unique_name DUMMY are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default


RMAN> RUN
2> {
3>   allocate channel c1 type disk format '/data01/bak/controlfile/%d_%T_%U.bak';
4>   SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/data01/bak/controlfile/%F';
5>   restore spfile to pfile '/u01/app/oracle/product/12.1.0/db_1/dbs/initprd12cdb1.ora' from '/data01/bak/controlfile/controlc-3299715205-20140528-00';
6>   release channel c1;
7> }

allocated channel: c1
channel c1: SID=789 device type=DISK

executing command: SET CONTROLFILE AUTOBACKUP FORMAT

Starting restore at 29-MAY-14

channel c1: restoring spfile from AUTOBACKUP /data01/bak/controlfile/controlc-3299715205-20140528-00
channel c1: SPFILE restore from AUTOBACKUP complete
Finished restore at 29-MAY-14

released channel: c1

RMAN>

RMAN> shutdown immediate;

Oracle instance shut down

RMAN>  startup nomount;

Oracle instance started

Total System Global Area   40486408192 bytes

Fixed Size                     2692048 bytes
Variable Size               6979324976 bytes
Database Buffers           33420214272 bytes
Redo Buffers                  84176896 bytes

RMAN> create spfile from pfile='/u01/app/oracle/product/12.1.0/db_1/dbs/initprd12cdb1.ora';

Statement processed


Recovery Manager complete.
[oracle@orat3 dbs]$ export ORACLE_SID=prd12cdb1
[oracle@orat3 dbs]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Thu May 29 10:27:43 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

connected to target database: PRD12CDB (not mounted)

RMAN> RUN
2> {
3>   allocate channel c1 type disk format '/data01/bak/controlfile/%d_%T_%U.bak';
4>   SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/data01/bak/controlfile/%F';
5>    RESTORE CONTROLFILE FROM '/data01/bak/controlfile/controlc-3299715205-20140528-00';
6>   release channel c1;
7> }

 using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=4 device type=DISK

executing command: SET CONTROLFILE AUTOBACKUP FORMAT

Starting restore at 29-MAY-14

channel c1: restoring control file
channel c1: restore complete, elapsed time: 00:00:03
output file name=/data01/current.261.844530693
output file name=/data01/current.256.844530693
Finished restore at 29-MAY-14

released channel: c1

RMAN>

RMAN>

RMAN> alter database mount;

Statement processed

RMAN> report schema;

Starting implicit crosscheck backup at 29-MAY-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4 device type=DISK
Crosschecked 29 objects
Finished implicit crosscheck backup at 29-MAY-14

Starting implicit crosscheck copy at 29-MAY-14
using channel ORA_DISK_1
Finished implicit crosscheck copy at 29-MAY-14

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

 

no files cataloged

RMAN-06139: WARNING: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name PRD12CDB

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    0        SYSTEM               ***     +SYSDATA/PRD12CDB/DATAFILE/system.258.844530577
3    0        SYSAUX               ***     +SYSDATA/PRD12CDB/DATAFILE/sysaux.257.844530511
4    0        UNDOTBS1             ***     +SYSDATA/PRD12CDB/DATAFILE/undotbs1.260.844530643
5    0        PDB$SEED:SYSTEM      ***     +SYSDATA/PRD12CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/system.267.844530717
6    0        USERS                ***     +SYSDATA/PRD12CDB/DATAFILE/users.259.844530643
7    0        PDB$SEED:SYSAUX      ***     +SYSDATA/PRD12CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/sysaux.266.844530717
8    0        UNDOTBS2             ***     +SYSDATA/PRD12CDB/DATAFILE/undotbs2.269.844531237
9    0        ZSKMSDB:SYSTEM       ***     +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/system.274.844531545
10   0        ZSKMSDB:SYSAUX       ***     +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/sysaux.273.844531543
11   0        ZSKMSDB:USERS        ***     +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/users.276.844531567
12   0        OSSPORTALDB:SYSTEM   ***     +SYSDATA/PRD12CDB/F6ACE29ECAE0576BE0430254800A9CD6/DATAFILE/system.277.844532409
13   0        OSSPORTALDB:SYSAUX   ***     +SYSDATA/PRD12CDB/F6ACE29ECAE0576BE0430254800A9CD6/DATAFILE/sysaux.278.844532409
16   0        ZSKMSDB:RESALE_DATA  ***     +ZSKDATA/xxx_01.dbf
17   0        ZSKMSDB:JTITSM       ***     +ZSKDATA/itsm_data01.dbf
18   0        OSSPORTALDB:JTITSM   ***     +OSSPTLDATA/itsm_data01.dbf
19   0        ZSKMSDB:SYSTEM       ***     +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/system02.dbf
20   0        ZSKMSDB:SYSAUX       ***     +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/sysaux02.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    60       TEMP                 32767       +SYSDATA/PRD12CDB/TEMPFILE/temp.265.844530711
2    20       PDB$SEED:TEMP        32767       +SYSDATA/PRD12CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/pdbseed_temp01.dbf
3    20       ZSKMSDB:TEMP         32767       +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/TEMPFILE/temp.275.844531547
4    20       OSSPORTALDB:TEMP     32767       +SYSDATA/PRD12CDB/F6ACE29ECAE0576BE0430254800A9CD6/TEMPFILE/temp.279.844532411

RMAN>
RMAN>
RMAN>
RMAN> catalog start with '/datao1/bak/bak';

searching for all files that match the pattern /datao1/bak/bak
no files found to be unknown to the database

RMAN> catalog start with '/data01/bak/bak';

searching for all files that match the pattern /data01/bak/bak

List of Files Unknown to the Database
=====================================
File Name: /data01/bak/bak/d-20140525-848449834-209-1.dbf
File Name: /data01/bak/bak/d-20140525-848449818-198-1.dbf
File Name: /data01/bak/bak/d-20140525-848449833-208-1.dbf
File Name: /data01/bak/bak/d-20140525-848449821-203-1.dbf
File Name: /data01/bak/bak/d-20140525-848449817-196-1.dbf
File Name: /data01/bak/bak/d-20140525-848449818-199-1.dbf
File Name: /data01/bak/bak/d-20140525-848449820-201-1.dbf
File Name: /data01/bak/bak/d-20140525-848449819-200-1.dbf
File Name: /data01/bak/bak/l-20140528-848712615-224-1.log
File Name: /data01/bak/bak/d-20140525-848449820-202-1.dbf
File Name: /data01/bak/bak/l-20140525-848453414-214-1.log
File Name: /data01/bak/bak/controlfile/controlc-3299715205-20140528-00
File Name: /data01/bak/bak/l-20140525-848449855-211-1.log
File Name: /data01/bak/bak/l-20140525-848449855-212-1.log
File Name: /data01/bak/bak/l-20140527-848626214-220-1.log
File Name: /data01/bak/bak/l-20140528-848712615-223-1.log
File Name: /data01/bak/bak/d-20140525-848449817-197-1.dbf
File Name: /data01/bak/bak/d-20140525-848449829-204-1.dbf
File Name: /data01/bak/bak/d-20140525-848449833-207-1.dbf
File Name: /data01/bak/bak/d-20140525-848449829-205-1.dbf
File Name: /data01/bak/bak/l-20140525-848453414-215-1.log
File Name: /data01/bak/bak/d-20140525-848449832-206-1.dbf
File Name: /data01/bak/bak/l-20140526-848539814-217-1.log
File Name: /data01/bak/bak/l-20140527-848626214-221-1.log
File Name: /data01/bak/bak/l-20140526-848539814-218-1.log

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

List of Cataloged Files
=======================
File Name: /data01/bak/bak/d-20140525-848449834-209-1.dbf
File Name: /data01/bak/bak/d-20140525-848449818-198-1.dbf
File Name: /data01/bak/bak/d-20140525-848449833-208-1.dbf
File Name: /data01/bak/bak/d-20140525-848449821-203-1.dbf
File Name: /data01/bak/bak/d-20140525-848449817-196-1.dbf
File Name: /data01/bak/bak/d-20140525-848449818-199-1.dbf
File Name: /data01/bak/bak/d-20140525-848449820-201-1.dbf
File Name: /data01/bak/bak/d-20140525-848449819-200-1.dbf
File Name: /data01/bak/bak/l-20140528-848712615-224-1.log
File Name: /data01/bak/bak/d-20140525-848449820-202-1.dbf
File Name: /data01/bak/bak/l-20140525-848453414-214-1.log
File Name: /data01/bak/bak/controlfile/controlc-3299715205-20140528-00
File Name: /data01/bak/bak/l-20140525-848449855-211-1.log
File Name: /data01/bak/bak/l-20140525-848449855-212-1.log
File Name: /data01/bak/bak/l-20140527-848626214-220-1.log
File Name: /data01/bak/bak/l-20140528-848712615-223-1.log
File Name: /data01/bak/bak/d-20140525-848449817-197-1.dbf
File Name: /data01/bak/bak/d-20140525-848449829-204-1.dbf
File Name: /data01/bak/bak/d-20140525-848449833-207-1.dbf
File Name: /data01/bak/bak/d-20140525-848449829-205-1.dbf
File Name: /data01/bak/bak/l-20140525-848453414-215-1.log
File Name: /data01/bak/bak/d-20140525-848449832-206-1.dbf
File Name: /data01/bak/bak/l-20140526-848539814-217-1.log
File Name: /data01/bak/bak/l-20140527-848626214-221-1.log
File Name: /data01/bak/bak/l-20140526-848539814-218-1.log

RMAN> restore database preview;

Starting restore at 29-MAY-14
using channel ORA_DISK_1

 
List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
198     Incr 0  672.11M    DISK        00:00:08     25-MAY-14     
        BP Key: 231   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449820-201-1.dbf
  List of Datafiles in backup set 198
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 7411637    25-MAY-14 +SYSDATA/PRD12CDB/DATAFILE/system.258.844530577

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
207     Incr 0  2.13G      DISK        00:00:19     25-MAY-14     
        BP Key: 241   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449817-197-1.dbf
  List of Datafiles in backup set 207
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  3    0  Incr 7411632    25-MAY-14 +SYSDATA/PRD12CDB/DATAFILE/sysaux.257.844530511

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
208     Incr 0  20.71M     DISK        00:00:07     25-MAY-14     
        BP Key: 244   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449829-205-1.dbf
  List of Datafiles in backup set 208
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  4    0  Incr 7411652    25-MAY-14 +SYSDATA/PRD12CDB/DATAFILE/undotbs1.260.844530643

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
204     Incr 0  209.90M    DISK        00:00:02     25-MAY-14     
        BP Key: 246   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449832-206-1.dbf
  List of Datafiles in backup set 204
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  5    0  Incr 1921022    10-APR-14 +SYSDATA/PRD12CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/system.267.844530717

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
206     Incr 0  1.34M      DISK        00:00:01     25-MAY-14     
        BP Key: 225   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449834-209-1.dbf
  List of Datafiles in backup set 206
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  6    0  Incr 7411660    25-MAY-14 +SYSDATA/PRD12CDB/DATAFILE/users.259.844530643

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
202     Incr 0  531.05M    DISK        00:00:12     25-MAY-14     
        BP Key: 228   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449821-203-1.dbf
  List of Datafiles in backup set 202
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  7    0  Incr 1921022    10-APR-14 +SYSDATA/PRD12CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/sysaux.266.844530717

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
205     Incr 0  15.74M     DISK        00:00:01     25-MAY-14     
        BP Key: 227   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449833-208-1.dbf
  List of Datafiles in backup set 205
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  8    0  Incr 7411657    25-MAY-14 +SYSDATA/PRD12CDB/DATAFILE/undotbs2.269.844531237

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
201     Incr 0  769.01M    DISK        00:00:14     25-MAY-14     
        BP Key: 232   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449819-200-1.dbf
  List of Datafiles in backup set 201
  Container ID: 3, PDB Name: ZSKMSDB
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  9    0  Incr 7411636    25-MAY-14 +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/system.274.844531545
  10   0  Incr 7411636    25-MAY-14 +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/sysaux.273.844531543

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
197     Incr 0  3.51M      DISK        00:00:02     25-MAY-14     
        BP Key: 230   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449818-199-1.dbf
  List of Datafiles in backup set 197
  Container ID: 3, PDB Name: ZSKMSDB
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  11   0  Incr 7411635    25-MAY-14 +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/users.276.844531567
  20   0  Incr 7411635    25-MAY-14 +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/sysaux02.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
209     Incr 0  216.70M    DISK        00:00:08     25-MAY-14     
        BP Key: 242   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449829-204-1.dbf
  List of Datafiles in backup set 209
  Container ID: 4, PDB Name: OSSPORTALDB
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  12   0  Incr 7411649    25-MAY-14 +SYSDATA/PRD12CDB/F6ACE29ECAE0576BE0430254800A9CD6/DATAFILE/system.277.844532409

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
200     Incr 0  548.52M    DISK        00:00:11     25-MAY-14     
        BP Key: 234   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449820-202-1.dbf
  List of Datafiles in backup set 200
  Container ID: 4, PDB Name: OSSPORTALDB
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  13   0  Incr 7411639    25-MAY-14 +SYSDATA/PRD12CDB/F6ACE29ECAE0576BE0430254800A9CD6/DATAFILE/sysaux.278.844532409

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
199     Incr 0  69.59M     DISK        00:00:11     25-MAY-14     
        BP Key: 229   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449817-196-1.dbf
  List of Datafiles in backup set 199
  Container ID: 3, PDB Name: ZSKMSDB
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  16   0  Incr 7411631    25-MAY-14 +ZSKDATA/xxx_01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
196     Incr 0  2.04M      DISK        00:00:02     25-MAY-14     
        BP Key: 226   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449818-198-1.dbf
  List of Datafiles in backup set 196
  Container ID: 3, PDB Name: ZSKMSDB
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  17   0  Incr 7411633    25-MAY-14 +ZSKDATA/itsm_data01.dbf
  19   0  Incr 7411633    25-MAY-14 +SYSDATA/PRD12CDB/F6ACAF06A0755467E0430254800A2839/DATAFILE/system02.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
203     Incr 0  1.03M      DISK        00:00:01     25-MAY-14     
        BP Key: 243   Status: AVAILABLE  Compressed: NO  Tag: HOT_DB_BK_LEVEL0
        Piece Name: /data01/bak/bak/d-20140525-848449833-207-1.dbf
  List of Datafiles in backup set 203
  Container ID: 4, PDB Name: OSSPORTALDB
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  18   0  Incr 7411656    25-MAY-14 +OSSPTLDATA/itsm_data01.dbf


List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
211     9.50K      DISK        00:00:00     25-MAY-14     
        BP Key: 237   Status: AVAILABLE  Compressed: NO  Tag: TAG20140525T003055
        Piece Name: /data01/bak/bak/l-20140525-848449855-211-1.log

  List of Archived Logs in backup set 211
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    44      7411550    25-MAY-14 7411748    25-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
212     3.00K      DISK        00:00:01     25-MAY-14     
        BP Key: 238   Status: AVAILABLE  Compressed: NO  Tag: TAG20140525T003055
        Piece Name: /data01/bak/bak/l-20140525-848449855-212-1.log

  List of Archived Logs in backup set 212
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  2    47      7411554    25-MAY-14 7411744    25-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
214     5.21M      DISK        00:00:00     25-MAY-14     
        BP Key: 235   Status: AVAILABLE  Compressed: NO  Tag: TAG20140525T013014
        Piece Name: /data01/bak/bak/l-20140525-848453414-214-1.log

  List of Archived Logs in backup set 214
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  2    48      7411744    25-MAY-14 7433608    25-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
215     34.66M     DISK        00:00:00     25-MAY-14     
        BP Key: 245   Status: AVAILABLE  Compressed: NO  Tag: TAG20140525T013014
        Piece Name: /data01/bak/bak/l-20140525-848453414-215-1.log

  List of Archived Logs in backup set 215
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    45      7411748    25-MAY-14 7433612    25-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
217     135.35M    DISK        00:00:01     26-MAY-14     
        BP Key: 247   Status: AVAILABLE  Compressed: NO  Tag: TAG20140526T013014
        Piece Name: /data01/bak/bak/l-20140526-848539814-217-1.log

  List of Archived Logs in backup set 217
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  2    49      7433608    25-MAY-14 7579635    26-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
218     237.28M    DISK        00:00:01     26-MAY-14     
        BP Key: 249   Status: AVAILABLE  Compressed: NO  Tag: TAG20140526T013014
        Piece Name: /data01/bak/bak/l-20140526-848539814-218-1.log

  List of Archived Logs in backup set 218
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    46      7433612    25-MAY-14 7579641    26-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
220     142.25M    DISK        00:00:01     27-MAY-14     
        BP Key: 239   Status: AVAILABLE  Compressed: NO  Tag: TAG20140527T013014
        Piece Name: /data01/bak/bak/l-20140527-848626214-220-1.log

  List of Archived Logs in backup set 220
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  2    50      7579635    26-MAY-14 7712599    27-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
221     193.44M    DISK        00:00:01     27-MAY-14     
        BP Key: 248   Status: AVAILABLE  Compressed: NO  Tag: TAG20140527T013014
        Piece Name: /data01/bak/bak/l-20140527-848626214-221-1.log

  List of Archived Logs in backup set 221
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    47      7579641    26-MAY-14 7712594    27-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
224     193.30M    DISK        00:00:01     28-MAY-14     
        BP Key: 240   Status: AVAILABLE  Compressed: NO  Tag: TAG20140528T013014
        Piece Name: /data01/bak/bak/l-20140528-848712615-223-1.log

  List of Archived Logs in backup set 224
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    48      7712594    27-MAY-14 7838443    28-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
223     150.74M    DISK        00:00:01     28-MAY-14     
        BP Key: 233   Status: AVAILABLE  Compressed: NO  Tag: TAG20140528T013014
        Piece Name: /data01/bak/bak/l-20140528-848712615-224-1.log

  List of Archived Logs in backup set 223
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  2    51      7712599    27-MAY-14 7838440    28-MAY-14


^C
user interrupt received
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/29/2014 10:43:48
ORA-01013: user requested cancel of current operation

RMAN>

RMAN> exit

[oracle@orat3 dbs]$ export ORACLE_SID=prd12cdb1
[oracle@orat3 dbs]$ sqlplus '/ as sysdba'

SQL*Plus: Release 12.1.0.1.0 Production on Thu May 29 10:24:14 2014

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>
SQL>
SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      /data01/current.261.844530693,
                                                  /data01/current.256.844530693
SQL> show parameter dump

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/prd
                                                 12cdb/prd12cdb1/trace
core_dump_dest                       string      /u01/app/oracle/diag/rdbms/prd
                                                 12cdb/prd12cdb1/cdump
max_dump_file_size                   string      unlimited
shadow_core_dump                     string      partial
user_dump_dest                       string      /u01/app/oracle/diag/rdbms/prd
                                                 12cdb/prd12cdb1/trace
SQL> show parameter create

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
create_bitmap_area_size              integer     8388608
create_stored_outlines               string
db_create_file_dest                  string      /data01
db_create_online_log_dest_1          string      /data01
db_create_online_log_dest_2          string      /data01
db_create_online_log_dest_3          string
db_create_online_log_dest_4          string
db_create_online_log_dest_5          string
SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /data01
db_recovery_file_dest_size           big integer 2047M
recovery_parallelism                 integer     0
SQL> shut abort
startup nomount;
ORACLE instance shut down.
SQL> ORACLE instance started.

Total System Global Area 4.0486E+10 bytes
Fixed Size                  2692048 bytes
Variable Size            6979324976 bytes
Database Buffers         3.3420E+10 bytes
Redo Buffers               84176896 bytes
SQL>

Recovery Manager complete.
[oracle@orat3 dbs]$ rman target /

Recovery Manager: Release 12.1.0.1.0 - Production on Thu May 29 10:43:58 2014

Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.

 
connected to target database: PRD12CDB (DBID=3299715205, not open)

RMAN>
RMAN>
RMAN>
RMAN> RUN
2> {
3>   # allocate a channel to the tape device
4>     allocate channel c1 type disk format '/data01/bak/bak/%d_%T_%U.bak';
      allocate channel c2 type disk format '/data01/bak/bak/%d_%T_%U.bak';
        allocate channel c3 type disk format '/data01/bak/bak/%d_%T_%U.bak';
  # rename the data files and online redo logs
  set newname for database to '/data01/%f.dbf';
  # Do a SET UNTIL to prevent recovery of the online logs
  set until time "to_date('05/28/2014 17:00:00','mm/dd/yyyy hh24:mi:ss')";
  # restore the database and switch the data file names
  RESTORE DATABASE;
  SWITCH DATAFILE ALL;
  # recover the database
  RECOVER DATABASE;
       release channel disk1;
   release channel disk2;
   release channel disk3;
}5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19>

allocated channel: c1
channel c1: SID=4 device type=DISK

allocated channel: c2
channel c2: SID=9239 device type=DISK

allocated channel: c3
channel c3: SID=10778 device type=DISK

executing command: SET NEWNAME

executing command: SET until clause

Starting restore at 29-MAY-14

 

channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00011 to /data01/11.dbf
channel c1: restoring datafile 00020 to /data01/20.dbf
channel c1: reading from backup piece /data01/bak/bak/d-20140525-848449818-199-1.dbf
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00017 to /data01/17.dbf
channel c2: restoring datafile 00019 to /data01/19.dbf
channel c2: reading from backup piece /data01/bak/bak/d-20140525-848449818-198-1.dbf
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00001 to /data01/1.dbf
channel c3: reading from backup piece /data01/bak/bak/d-20140525-848449820-201-1.dbf

 

channel c1: piece handle=/data01/bak/bak/d-20140525-848449818-199-1.dbf tag=HOT_DB_BK_LEVEL0
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:35
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00016 to /data01/16.dbf
channel c1: reading from backup piece /data01/bak/bak/d-20140525-848449817-196-1.dbf


channel c2: piece handle=/data01/bak/bak/d-20140525-848449818-198-1.dbf tag=HOT_DB_BK_LEVEL0
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:01:00
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00013 to /data01/13.dbf
channel c2: reading from backup piece /data01/bak/bak/d-20140525-848449820-202-1.dbf
channel c3: piece handle=/data01/bak/bak/d-20140525-848449820-201-1.dbf tag=HOT_DB_BK_LEVEL0
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:01:00
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00007 to /data01/7.dbf
channel c3: reading from backup piece /data01/bak/bak/d-20140525-848449821-203-1.dbf
channel c1: piece handle=/data01/bak/bak/d-20140525-848449817-196-1.dbf tag=HOT_DB_BK_LEVEL0
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:02:00
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00009 to /data01/9.dbf
channel c1: restoring datafile 00010 to /data01/10.dbf
channel c1: reading from backup piece /data01/bak/bak/d-20140525-848449819-200-1.dbf
channel c3: piece handle=/data01/bak/bak/d-20140525-848449821-203-1.dbf tag=HOT_DB_BK_LEVEL0
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:01:42
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00005 to /data01/5.dbf
channel c3: reading from backup piece /data01/bak/bak/d-20140525-848449832-206-1.dbf
channel c1: piece handle=/data01/bak/bak/d-20140525-848449819-200-1.dbf tag=HOT_DB_BK_LEVEL0
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:22
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00008 to /data01/8.dbf
channel c1: reading from backup piece /data01/bak/bak/d-20140525-848449833-208-1.dbf
channel c3: piece handle=/data01/bak/bak/d-20140525-848449832-206-1.dbf tag=HOT_DB_BK_LEVEL0
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:00:15
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00018 to /data01/18.dbf
channel c3: reading from backup piece /data01/bak/bak/d-20140525-848449833-207-1.dbf
channel c1: piece handle=/data01/bak/bak/d-20140525-848449833-208-1.dbf tag=HOT_DB_BK_LEVEL0
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:01
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00006 to /data01/6.dbf
channel c1: reading from backup piece /data01/bak/bak/d-20140525-848449834-209-1.dbf
channel c2: piece handle=/data01/bak/bak/d-20140525-848449820-202-1.dbf tag=HOT_DB_BK_LEVEL0
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:01:58
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00003 to /data01/3.dbf
channel c2: reading from backup piece /data01/bak/bak/d-20140525-848449817-197-1.dbf
channel c1: piece handle=/data01/bak/bak/d-20140525-848449834-209-1.dbf tag=HOT_DB_BK_LEVEL0
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:01
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00004 to /data01/4.dbf
channel c1: reading from backup piece /data01/bak/bak/d-20140525-848449829-205-1.dbf
channel c3: piece handle=/data01/bak/bak/d-20140525-848449833-207-1.dbf tag=HOT_DB_BK_LEVEL0
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:00:03
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00012 to /data01/12.dbf
channel c3: reading from backup piece /data01/bak/bak/d-20140525-848449829-204-1.dbf
channel c1: piece handle=/data01/bak/bak/d-20140525-848449829-205-1.dbf tag=HOT_DB_BK_LEVEL0
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:07
channel c3: piece handle=/data01/bak/bak/d-20140525-848449829-204-1.dbf tag=HOT_DB_BK_LEVEL0
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:00:07
channel c2: piece handle=/data01/bak/bak/d-20140525-848449817-197-1.dbf tag=HOT_DB_BK_LEVEL0
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:00:47
Finished restore at 29-MAY-14


datafile 1 switched to datafile copy
input datafile copy RECID=20 STAMP=848833091 file name=/data01/1.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=21 STAMP=848833091 file name=/data01/3.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=22 STAMP=848833091 file name=/data01/4.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=23 STAMP=848833091 file name=/data01/5.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=24 STAMP=848833091 file name=/data01/6.dbf
datafile 7 switched to datafile copy
input datafile copy RECID=25 STAMP=848833091 file name=/data01/7.dbf


datafile 8 switched to datafile copy
input datafile copy RECID=26 STAMP=848833091 file name=/data01/8.dbf
datafile 9 switched to datafile copy
input datafile copy RECID=27 STAMP=848833091 file name=/data01/9.dbf
datafile 10 switched to datafile copy
input datafile copy RECID=28 STAMP=848833091 file name=/data01/10.dbf
datafile 11 switched to datafile copy
input datafile copy RECID=29 STAMP=848833091 file name=/data01/11.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=30 STAMP=848833091 file name=/data01/12.dbf
datafile 13 switched to datafile copy
input datafile copy RECID=31 STAMP=848833091 file name=/data01/13.dbf
datafile 16 switched to datafile copy
input datafile copy RECID=32 STAMP=848833091 file name=/data01/16.dbf
datafile 17 switched to datafile copy
input datafile copy RECID=33 STAMP=848833091 file name=/data01/17.dbf
datafile 18 switched to datafile copy
input datafile copy RECID=34 STAMP=848833091 file name=/data01/18.dbf


datafile 19 switched to datafile copy
input datafile copy RECID=35 STAMP=848833091 file name=/data01/19.dbf
datafile 20 switched to datafile copy
input datafile copy RECID=36 STAMP=848833091 file name=/data01/20.dbf

Starting recover at 29-MAY-14

 

starting media recovery

channel c1: starting archived log restore to default destination
channel c1: restoring archived log
archived log thread=1 sequence=44
channel c1: reading from backup piece /data01/bak/bak/l-20140525-848449855-211-1.log
channel c2: starting archived log restore to default destination
channel c2: restoring archived log
archived log thread=2 sequence=47
channel c2: reading from backup piece /data01/bak/bak/l-20140525-848449855-212-1.log
channel c3: starting archived log restore to default destination
channel c3: restoring archived log
archived log thread=2 sequence=48
channel c3: reading from backup piece /data01/bak/bak/l-20140525-848453414-214-1.log
channel c1: piece handle=/data01/bak/bak/l-20140525-848449855-211-1.log tag=TAG20140525T003055
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:00
channel c1: starting archived log restore to default destination
channel c1: restoring archived log
archived log thread=1 sequence=45
channel c1: reading from backup piece /data01/bak/bak/l-20140525-848453414-215-1.log
channel c2: piece handle=/data01/bak/bak/l-20140525-848449855-212-1.log tag=TAG20140525T003055
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:00:00
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_47_9rf8yd6v_.arc thread=2 sequence=47
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_44_9rf8yd62_.arc thread=1 sequence=44
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_47_9rf8yd6v_.arc RECID=101 STAMP=848833484
channel c2: starting archived log restore to default destination
channel c2: restoring archived log
archived log thread=2 sequence=49
channel c2: reading from backup piece /data01/bak/bak/l-20140526-848539814-217-1.log
channel c3: piece handle=/data01/bak/bak/l-20140525-848453414-214-1.log tag=TAG20140525T013014
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:00:00
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_48_9rf8yd7t_.arc thread=2 sequence=48
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_44_9rf8yd62_.arc RECID=100 STAMP=848833484
channel c3: starting archived log restore to default destination
channel c3: restoring archived log
archived log thread=1 sequence=46
channel c3: reading from backup piece /data01/bak/bak/l-20140526-848539814-218-1.log
channel c1: piece handle=/data01/bak/bak/l-20140525-848453414-215-1.log tag=TAG20140525T013014
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:01
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_45_9rf8ydf0_.arc thread=1 sequence=45
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_48_9rf8yd7t_.arc RECID=102 STAMP=848833484
channel c1: starting archived log restore to default destination
channel c1: restoring archived log
archived log thread=2 sequence=50
channel c1: reading from backup piece /data01/bak/bak/l-20140527-848626214-220-1.log
channel c2: piece handle=/data01/bak/bak/l-20140526-848539814-217-1.log tag=TAG20140526T013014
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:00:07
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_49_9rf8ydtv_.arc thread=2 sequence=49
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_45_9rf8ydf0_.arc RECID=103 STAMP=848833485
channel c2: starting archived log restore to default destination
channel c2: restoring archived log
archived log thread=1 sequence=47
channel c2: reading from backup piece /data01/bak/bak/l-20140527-848626214-221-1.log
channel c3: piece handle=/data01/bak/bak/l-20140526-848539814-218-1.log tag=TAG20140526T013014
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:00:06
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_46_9rf8yf7b_.arc thread=1 sequence=46
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_49_9rf8ydtv_.arc RECID=104 STAMP=848833487
channel c3: starting archived log restore to default destination
channel c3: restoring archived log
archived log thread=1 sequence=48
channel c3: reading from backup piece /data01/bak/bak/l-20140528-848712615-223-1.log
channel c1: piece handle=/data01/bak/bak/l-20140527-848626214-220-1.log tag=TAG20140527T013014
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:09
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_50_9rf8ym51_.arc thread=2 sequence=50
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_46_9rf8yf7b_.arc RECID=105 STAMP=848833490
channel c1: starting archived log restore to default destination
channel c1: restoring archived log
archived log thread=2 sequence=51
channel c1: reading from backup piece /data01/bak/bak/l-20140528-848712615-224-1.log
channel c2: piece handle=/data01/bak/bak/l-20140527-848626214-221-1.log tag=TAG20140527T013014
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:00:10
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_47_9rf8ymc6_.arc thread=1 sequence=47
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_47_9rf8ymc6_.arc RECID=107 STAMP=848833495
channel c1: piece handle=/data01/bak/bak/l-20140528-848712615-224-1.log tag=TAG20140528T013014
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:06
channel c3: piece handle=/data01/bak/bak/l-20140528-848712615-223-1.log tag=TAG20140528T013014
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 00:00:07
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_1_48_9rf8ywsl_.arc thread=1 sequence=48
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_50_9rf8ym51_.arc RECID=106 STAMP=848833493
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_51_9rf8yx4t_.arc thread=2 sequence=51
channel default: deleting archived log(s)
archived log file name=/data01/PRD12CDB/archivelog/2014_05_29/o1_mf_2_51_9rf8yx4t_.arc RECID=109 STAMP=848833502
unable to find archived log
archived log thread=2 sequence=52

 

released channel: c1
released channel: c2
released channel: c3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/29/2014 11:05:14
RMAN-06054: media recovery requesting unknown archived log for thread 2 with sequence 52 and starting SCN of 7838440

RMAN>
RMAN>
RMAN>
RMAN>

RMAN> sql 'alter database open resetlogs';

sql statement: alter database open resetlogs

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13750068/viewspace-1172370/,如需轉載,請註明出處,否則將追究法律責任。

相關文章