Wednesday, March 25, 2020

RMAN Restore Database

Recovery Manager complete.
! cpwebpklorblok:/dbapps/oracle/oradata/CPWEBP> rman target /

Recovery Manager: Release 18.0.0.0.0 - Production on Wed Mar 25 02:45:06 2020
Version 18.8.0.0.0

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

connected to target database: CPWEBP (not mounted)

RMAN> list backup of controlfile;

using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of list command at 03/25/2020 02:45:19
ORA-01507: database not mounted

[I CHOOSE THE WRONG BACKUPSET!!!!]

RMAN> restore controlfile from '/dbapps/oracle/fast_recovery_area/CPWEBP/backups                                                                             et/2020_03_25/o1_mf_nnndf_FULL_BACKUP_h7p68km7_.bkp';

Starting restore at 25-MAR-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=237 device type=DISK

channel ORA_DISK_1: restoring control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/25/2020 02:47:41
ORA-19697: standby control file not found in backup set

[WISHFUL THINKING!!!]
RMAN> restore database;
Starting restore at 25-MAR-20
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/25/2020 02:49:41
ORA-01507: database not mounted


RMAN> show all
2> ;

RMAN configuration parameters for database with db_unique_name CPWEBP are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # 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

[GOOD THING CONTROLFILE AUTOBACKUP WAS ON]

RMAN> restore controlfile from '/dbapps/oracle/fast_recovery_area/CPWEBP/autobac                                                                             kup/2020_03_25/o1_mf_s_1035942155_h7p6cwpq_.bkp'
2> ;

Starting restore at 25-MAR-20
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/dbapps/oracle/oradata/CPWEBP/control01.ctl
output file name=/dbaredo/fast_recovery_area/CPWEBP/control02.ctl
Finished restore at 25-MAR-20


RMAN> alter database mount;

released channel: ORA_DISK_1
Statement processed

RMAN> restore database;

Starting restore at 25-MAR-20
Starting implicit crosscheck backup at 25-MAR-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK
Crosschecked 2 objects
Finished implicit crosscheck backup at 25-MAR-20

Starting implicit crosscheck copy at 25-MAR-20
using channel ORA_DISK_1
Finished implicit crosscheck copy at 25-MAR-20

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

List of Cataloged Files
=======================
File Name: /dbapps/oracle/fast_recovery_area/CPWEBP/autobackup/2020_03_25/o1_mf_                                                                             s_1035942155_h7p6cwpq_.bkp

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /dbapps/oracle/oradata/CPWEBP/sy                                                                             stem01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /dbapps/oracle/oradata/CPWEBP/ca                                                                             pex01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /dbapps/oracle/oradata/CPWEBP/sy                                                                             saux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /dbapps/oracle/oradata/CPWEBP/un                                                                             dotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /dbapps/oracle/oradata/CPWEBP/pr                                                                             ess01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /dbapps/oracle/oradata/CPWEBP/us                                                                             ers01.dbf
channel ORA_DISK_1: restoring datafile 00008 to /dbapps/oracle/oradata/CPWEBP/cs                                                                             v2db01.dbf
channel ORA_DISK_1: restoring datafile 00009 to /dbapps/oracle/oradata/CPWEBP/dm                                                                             s01.dbf
channel ORA_DISK_1: restoring datafile 00010 to /dbapps/oracle/oradata/CPWEBP/sm                                                                             r01.dbf
channel ORA_DISK_1: reading from backup piece /dbapps/oracle/fast_recovery_area/                                                                             CPWEBP/backupset/2020_03_25/o1_mf_nnndf_FULL_BACKUP_h7p68km7_.bkp

channel ORA_DISK_1: piece handle=/dbapps/oracle/fast_recovery_area/CPWEBP/backup                                                                             set/2020_03_25/o1_mf_nnndf_FULL_BACKUP_h7p68km7_.bkp tag=FULL BACKUP
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:26
Finished restore at 25-MAR-20

RMAN>
RMAN> recover database;

Starting recover at 25-MAR-20
using channel ORA_DISK_1

starting media recovery

unable to find archived log
archived log thread=1 sequence=408
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/25/2020 02:57:52
RMAN-06054: media recovery requesting unknown archived log for thread 1 with seq                                                                             uence 408 and starting SCN of 11113178284895

RMAN> alter database open resetlogs;

Statement processed

RMAN> list backup;


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


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    10.23M     DISK        00:00:00     12-SEP-19
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20190912T120812
        Piece Name: /dbapps/oracle/fast_recovery_area/CPWEBP/autobackup/2019_09_                                                                             12/o1_mf_s_1018786092_gqo5wwm2_.bkp
  SPFILE Included: Modification time: 12-SEP-19
  SPFILE db_unique_name: CPWEBP
  Control File Included: Ckp SCN: 11109337668363   Ckp time: 12-SEP-19

No comments:

Post a Comment