knowledge is power – share it · web viewdata guard and backup and recovery workshop part two...

106
1 Backup and Recovery Workshop Lab Exercise One (Backups) Data Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups via backup sets Performing database full backups via image copies Performing database incremental backups Managing database backups Creating a Recovery Catalog Reporting on database backups

Upload: others

Post on 01-Mar-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

1

Data Guard and Backup and Recovery Workshop

Part Two (Backup and Recovery)

Lab Exercise One

❖ Configuring RMAN❖ Performing database full backups via backup sets ❖ Performing database full backups via image copies❖ Performing database incremental backups❖ Managing database backups❖ Creating a Recovery Catalog ❖ Reporting on database backups

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 2: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

2

Create the database orcl

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 3: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

3Backup and Recovery Workshop Lab Exercise One (Backups)

Page 4: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

4Backup and Recovery Workshop Lab Exercise One (Backups)

Page 5: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

5Backup and Recovery Workshop Lab Exercise One (Backups)

Page 6: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

6Backup and Recovery Workshop Lab Exercise One (Backups)

Page 7: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

7Backup and Recovery Workshop Lab Exercise One (Backups)

Page 8: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

8Backup and Recovery Workshop Lab Exercise One (Backups)

Page 9: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

9Backup and Recovery Workshop Lab Exercise One (Backups)

Page 10: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

10Backup and Recovery Workshop Lab Exercise One (Backups)

Page 11: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

11Backup and Recovery Workshop Lab Exercise One (Backups)

Page 12: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

12Backup and Recovery Workshop Lab Exercise One (Backups)

Page 13: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

13Backup and Recovery Workshop Lab Exercise One (Backups)

Page 14: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

14Backup and Recovery Workshop Lab Exercise One (Backups)

Page 15: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

15Backup and Recovery Workshop Lab Exercise One (Backups)

Page 16: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

16Backup and Recovery Workshop Lab Exercise One (Backups)

Page 17: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

17Backup and Recovery Workshop Lab Exercise One (Backups)

Page 18: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

18Backup and Recovery Workshop Lab Exercise One (Backups)

Page 19: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

19

Configure RMAN

[oracle@host01 ~]$ . oraenvORACLE_SID = [amer] ? orclThe Oracle base remains unchanged with value /u01/app/oracle

[oracle@host01 ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Dec 15 07:53:52 2017

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

connected to target database: ORCL (DBID=1490563868)

RMAN> show all;

using target database control file instead of recovery catalogRMAN configuration parameters for database with db_unique_name ORCL are:CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # defaultCONFIGURE BACKUP OPTIMIZATION OFF; # defaultCONFIGURE DEFAULT DEVICE TYPE TO DISK; # defaultCONFIGURE CONTROLFILE AUTOBACKUP ON; # defaultCONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # defaultCONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE MAXSETSIZE TO UNLIMITED; # defaultCONFIGURE ENCRYPTION FOR DATABASE OFF; # defaultCONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 20: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

20

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # defaultCONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # defaultCONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # defaultCONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

RMAN> configure backup optimization on;

new RMAN configuration parameters:CONFIGURE BACKUP OPTIMIZATION ON;new RMAN configuration parameters are successfully stored

RMAN> show backup optimization;

RMAN configuration parameters for database with db_unique_name ORCL are:CONFIGURE BACKUP OPTIMIZATION ON;

Perform a full database backup

RMAN> backup database;

Starting backup at 15-DEC-17allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=68 device type=DISKchannel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 21: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

21

input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080142_f364777f_.bkp tag=TAG20171215T080142 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784118_f3647pns_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

View backup details

RMAN> list backup of database;

ist of Backup Sets===================

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------1 Full 1.06G DISK 00:00:10 15-DEC-17 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20171215T080142 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080142_f364777f_.bkp

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 22: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

22

List of Datafiles in backup set 1 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 Full 1422519 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf 3 Full 1422519 15-DEC-17 NO /u01/app/oracle/oradata/orcl/sysaux01.dbf 4 Full 1422519 15-DEC-17 NO /u01/app/oracle/oradata/orcl/undotbs01.dbf 7 Full 1422519 15-DEC-17 NO /u01/app/oracle/oradata/orcl/users01.dbf

RMAN>

RMAN> list backup of datafile 1;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------1 Full 1.06G DISK 00:00:10 15-DEC-17 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20171215T080142 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080142_f364777f_.bkp List of Datafiles in backup set 1 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 Full 1422519 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 23: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

23

RMAN> list backup of tablespace users;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------1 Full 1.06G DISK 00:00:10 15-DEC-17 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20171215T080142 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080142_f364777f_.bkp List of Datafiles in backup set 1 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 7 Full 1422519 15-DEC-17 NO /u01/app/oracle/oradata/orcl/users01.dbf

RMAN> report schema;

Report of database schema for database with db_unique_name ORCL

List of Permanent Datafiles===========================File Size(MB) Tablespace RB segs Datafile Name---- -------- -------------------- ------- ------------------------1 800 SYSTEM YES /u01/app/oracle/oradata/orcl/system01.dbf3 470 SYSAUX NO /u01/app/oracle/oradata/orcl/sysaux01.dbf

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 24: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

24

4 70 UNDOTBS1 YES /u01/app/oracle/oradata/orcl/undotbs01.dbf7 5 USERS NO /u01/app/oracle/oradata/orcl/users01.dbf

List of Temporary Files=======================File Size(MB) Tablespace Maxsize(MB) Tempfile Name---- -------- -------------------- ----------- --------------------1 32 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf

RMAN>

RMAN> list backup of spfile;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------2 Full 10.19M DISK 00:00:00 15-DEC-17 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20171215T080158 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784118_f3647pns_.bkp SPFILE Included: Modification time: 15-DEC-17 SPFILE db_unique_name: ORCL

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 25: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

25

RMAN> list backup of controlfile;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------2 Full 10.19M DISK 00:00:00 15-DEC-17 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20171215T080158 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784118_f3647pns_.bkp Control File Included: Ckp SCN: 1422530 Ckp time: 15-DEC-17

RMAN>

Backup Archive Log Files

RMAN> list backup of archivelog all;

specification does not match any backup in the repository

RMAN> alter system switch logfile;

Statement processed

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 26: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

26

RMAN> alter system switch logfile;

Statement processed

RMAN> backup archivelog all not backed up 1 times;

Starting backup at 15-DEC-17current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=1 RECID=1 STAMP=962784459input archived log thread=1 sequence=2 RECID=2 STAMP=962784466input archived log thread=1 sequence=3 RECID=3 STAMP=962784494channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T080814_f364mgg1_.bkp tag=TAG20171215T080814 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784495_f364mj19_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

RMAN> list backup of archivelog all completed after 'sysdate-1';

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 27: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

27

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

BS Key Size Device Type Elapsed Time Completion Time------- ---------- ----------- ------------ ---------------3 152.74M DISK 00:00:00 15-DEC-17 BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20171215T080814 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T080814_f364mgg1_.bkp

List of Archived Logs in backup set 3 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 1 1408558 15-DEC-17 1423107 15-DEC-17 1 2 1423107 15-DEC-17 1423119 15-DEC-17 1 3 1423119 15-DEC-17 1423137 15-DEC-17

Backup Redundancy

RMAN> backup database ;

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 28: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

28

input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080959_f364pqml_.bkp tag=TAG20171215T080959 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784614_f364q6ys_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN> report obsolete;

RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1Report of obsolete backups and copiesType Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------Backup Set 1 15-DEC-17 Backup Piece 1 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080142_f364777f_.bkpArchive Log 1 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_1_f364lbky_.arcArchive Log 2 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_2_f364llyl_.arcArchive Log 3 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_3_f364mfz6_.arcBackup Set 3 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 29: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

29

Backup Piece 3 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T080814_f364mgg1_.bkp

RMAN> list backup of database summary;

List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---1 B F A DISK 15-DEC-17 1 1 NO TAG20171215T0801425 B F A DISK 15-DEC-17 1 1 NO TAG20171215T080959

RMAN> delete obsolete;

RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1using channel ORA_DISK_1Deleting the following obsolete backups and copies:Type Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------Backup Set 1 15-DEC-17 Backup Piece 1 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080142_f364777f_.bkpArchive Log 1 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_1_f364lbky_.arcArchive Log 2 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_2_f364llyl_.arcArchive Log 3 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_3_f364mfz6_.arcBackup Set 3 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 30: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

30

Backup Piece 3 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T080814_f364mgg1_.bkp

Do you really want to delete the above objects (enter YES or NO)? yesdeleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080142_f364777f_.bkp RECID=1 STAMP=962784103deleted archived logarchived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_1_f364lbky_.arc RECID=1 STAMP=962784459deleted archived logarchived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_2_f364llyl_.arc RECID=2 STAMP=962784466deleted archived logarchived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_3_f364mfz6_.arc RECID=3 STAMP=962784494deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T080814_f364mgg1_.bkp RECID=3 STAMP=962784494Deleted 5 objects

RMAN>

RMAN> list backup of database;

List of Backup Sets

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 31: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

31

===================

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------5 Full 1021.01M DISK 00:00:12 15-DEC-17 BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20171215T080959 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T080959_f364pqml_.bkp List of Datafiles in backup set 5 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 Full 1423228 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf 3 Full 1423228 15-DEC-17 NO /u01/app/oracle/oradata/orcl/sysaux01.dbf 4 Full 1423228 15-DEC-17 NO /u01/app/oracle/oradata/orcl/undotbs01.dbf 7 Full 1423228 15-DEC-17 NO /u01/app/oracle/oradata/orcl/users01.dbf

RMAN>

RMAN> list backup of archivelog all;

specification does not match any backup in the repository

Backup Tags

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 32: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

32

RMAN> backup database tag 'daily_db_bkp' plus archivelog tag 'daily_arch_bkp';

Starting backup at 15-DEC-17current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=11 RECID=11 STAMP=962785776channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365vjmr_.bkp tag=DAILY_ARCH_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f365vldh_.bkp tag=DAILY_DB_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15Finished backup at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 33: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

33

Starting backup at 15-DEC-17current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=12 RECID=12 STAMP=962785793channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365w1tk_.bkp tag=DAILY_ARCH_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962785795_f365w39n_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

RMAN> list backup of database tag 'daily_db_bkp';

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

BS Key Type LV Size Device Type Elapsed Time Completion Time

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 34: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

34

------- ---- -- ---------- ----------- ------------ ---------------12 Full 1020.76M DISK 00:00:10 15-DEC-17 BP Key: 12 Status: AVAILABLE Compressed: NO Tag: DAILY_DB_BKP Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f365vldh_.bkp List of Datafiles in backup set 12 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 Full 1424082 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf 3 Full 1424082 15-DEC-17 NO /u01/app/oracle/oradata/orcl/sysaux01.dbf 4 Full 1424082 15-DEC-17 NO /u01/app/oracle/oradata/orcl/undotbs01.dbf 7 Full 1424082 15-DEC-17 NO /u01/app/oracle/oradata/orcl/users01.dbf

RMAN>

RMAN> list backup of archivelog all tag 'daily_arch_bkp';

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

BS Key Size Device Type Elapsed Time Completion Time------- ---------- ----------- ------------ ---------------11 208.00K DISK 00:00:00 15-DEC-17 BP Key: 11 Status: AVAILABLE Compressed: NO Tag: DAILY_ARCH_BKP Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365vjmr_.bkp

List of Archived Logs in backup set 11

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 35: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

35

Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 11 1423592 15-DEC-17 1424075 15-DEC-17

BS Key Size Device Type Elapsed Time Completion Time------- ---------- ----------- ------------ ---------------13 3.50K DISK 00:00:00 15-DEC-17 BP Key: 13 Status: AVAILABLE Compressed: NO Tag: DAILY_ARCH_BKP Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365w1tk_.bkp

List of Archived Logs in backup set 13 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 12 1424075 15-DEC-17 1424092 15-DEC-17

RMAN>

RMAN> run { backup database tag 'daily_db_bkp' plus archivelog tag 'daily_arch_bkp' delete input;delete noprompt obsolete; }2> 3> 4>

Starting backup at 15-DEC-17current log archivedusing channel ORA_DISK_1skipping archived logs of thread 1 from sequence 11 to 12; already backed up

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 36: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

36

channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=13 RECID=13 STAMP=962785928channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f36608jw_.bkp tag=DAILY_ARCH_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01channel ORA_DISK_1: deleting archived log(s)archived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_13_f366086h_.arc RECID=13 STAMP=962785928channel ORA_DISK_1: deleting archived log(s)archived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_11_f365vj5o_.arc RECID=11 STAMP=962785776archived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_12_f365w1gr_.arc RECID=12 STAMP=962785793Finished backup at 15-DEC-17

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f3660bcf_.bkp tag=DAILY_DB_BKP comment=NONE

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 37: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

37

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15Finished backup at 15-DEC-17

Starting backup at 15-DEC-17current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=14 RECID=14 STAMP=962785945channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f3660sqg_.bkp tag=DAILY_ARCH_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01channel ORA_DISK_1: deleting archived log(s)archived log file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/archivelog/2017_12_15/o1_mf_1_14_f3660sft_.arc RECID=14 STAMP=962785945Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962785946_f3660v6q_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1using channel ORA_DISK_1Deleting the following obsolete backups and copies:Type Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 38: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

38

Backup Set 8 15-DEC-17 Backup Piece 8 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T081927_f3658j03_.bkpBackup Set 9 15-DEC-17 Backup Piece 9 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_DB_BKP_f3658zf2_.bkpBackup Set 11 15-DEC-17 Backup Piece 11 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365vjmr_.bkpBackup Set 12 15-DEC-17 Backup Piece 12 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f365vldh_.bkpBackup Set 13 15-DEC-17 Backup Piece 13 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365w1tk_.bkpBackup Set 15 15-DEC-17 Backup Piece 15 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f36608jw_.bkpdeleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T081927_f3658j03_.bkp RECID=8 STAMP=962785167deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_DB_BKP_f3658zf2_.bkp RECID=9 STAMP=962785183deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365vjmr_.bkp RECID=11 STAMP=962785776deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f365vldh_.bkp RECID=12 STAMP=962785778

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 39: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

39

deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f365w1tk_.bkp RECID=13 STAMP=962785793deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_DAILY_ARCH_BKP_f36608jw_.bkp RECID=15 STAMP=962785928Deleted 6 objects

RMAN>

RMAN> list backup of database summary;

List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---16 B F A DISK 15-DEC-17 1 1 NO DAILY_DB_BKP

RMAN> list backup of archivelog all summary;

List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---17 B A A DISK 15-DEC-17 1 1 NO DAILY_ARCH_BKP

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 40: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

40

Backup Parallelism

RMAN> run {allocate channel c1 type disk; allocate channel c2 type disk;allocate channel c3 type disk;allocate channel c4 type disk; backup database tag 'daily_db_bkp'; }

released channel: ORA_DISK_1allocated channel: c1channel c1: SID=68 device type=DISK

allocated channel: c2channel c2: SID=24 device type=DISK

allocated channel: c3channel c3: SID=28 device type=DISK

allocated channel: c4channel c4: SID=64 device type=DISK

Starting backup at 15-DEC-17channel c1: starting full datafile backup setchannel c1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 41: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

41

channel c1: starting piece 1 at 15-DEC-17channel c2: starting full datafile backup setchannel c2: specifying datafile(s) in backup setinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfchannel c2: starting piece 1 at 15-DEC-17channel c3: starting full datafile backup setchannel c3: specifying datafile(s) in backup setinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfchannel c3: starting piece 1 at 15-DEC-17channel c4: starting full datafile backup setchannel c4: specifying datafile(s) in backup setinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel c4: starting piece 1 at 15-DEC-17channel c3: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj7l_.bkp tag=DAILY_DB_BKP comment=NONEchannel c3: backup set complete, elapsed time: 00:00:01channel c4: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj9d_.bkp tag=DAILY_DB_BKP comment=NONEchannel c4: backup set complete, elapsed time: 00:00:01channel c2: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj50_.bkp tag=DAILY_DB_BKP comment=NONEchannel c2: backup set complete, elapsed time: 00:00:07channel c1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj49_.bkp tag=DAILY_DB_BKP comment=NONEchannel c1: backup set complete, elapsed time: 00:00:15Finished backup at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 42: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

42

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962786719_f366s032_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17released channel: c1released channel: c2released channel: c3released channel: c4

RMAN>

RMAN> report schema;

Report of database schema for database with db_unique_name ORCL

List of Permanent Datafiles===========================File Size(MB) Tablespace RB segs Datafile Name---- -------- -------------------- ------- ------------------------1 800 SYSTEM YES /u01/app/oracle/oradata/orcl/system01.dbf3 470 SYSAUX NO /u01/app/oracle/oradata/orcl/sysaux01.dbf4 70 UNDOTBS1 YES /u01/app/oracle/oradata/orcl/undotbs01.dbf7 5 USERS NO /u01/app/oracle/oradata/orcl/users01.dbf

List of Temporary Files=======================File Size(MB) Tablespace Maxsize(MB) Tempfile Name

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 43: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

43

---- -------- -------------------- ----------- --------------------1 32 TEMP 32767 /u01/app/oracle/oradata/orcl/temp01.dbf

RMAN> list backup of datafile 1;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------22 Full 677.01M DISK 00:00:08 15-DEC-17 BP Key: 22 Status: AVAILABLE Compressed: NO Tag: DAILY_DB_BKP Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj49_.bkp List of Datafiles in backup set 22 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 Full 1424763 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf

RMAN> list backup of datafile 3;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 44: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

44

------- ---- -- ---------- ----------- ------------ ---------------21 Full 341.29M DISK 00:00:05 15-DEC-17 BP Key: 21 Status: AVAILABLE Compressed: NO Tag: DAILY_DB_BKP Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj50_.bkp List of Datafiles in backup set 21 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 3 Full 1424764 15-DEC-17 NO /u01/app/oracle/oradata/orcl/sysaux01.dbf

RMAN>

RMAN> run { backup database tag 'daily_db_bkp' filesperset 1;}2> 3>

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367wn3r_.bkp tag=DAILY_DB_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:07channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup set

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 45: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

45

input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367wvo4_.bkp tag=DAILY_DB_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:07channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367x2l1_.bkp tag=DAILY_DB_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367x3os_.bkp tag=DAILY_DB_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962787876_f367x51y_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 46: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

46

Monitor Fast Recovery Area Space Usage

SQL> set lines 100SQL> col name format a60SQL> select name, floor(space_limit / 1024 / 1024) "Size MB", ceil(space_used / 1024 / 1024) "Used MB"from v$recovery_file_dest; 2 3 4 5 NAME Size MB Used MB------------------------------------------------------------ ---------- ----------/u01/app/oracle/fast_recovery_area/orcl 8016 2131

SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID----------------------- ------------------ ------------------------- --------------- ----------CONTROL FILE 0 0 0 0REDO LOG 0 0 0 0ARCHIVED LOG 0 0 0 0BACKUP PIECE 26.58 12.74 16 0IMAGE COPY 0 0 0 0FLASHBACK LOG 0 0 0 0FOREIGN ARCHIVED LOG 0 0 0 0AUXILIARY DATAFILE COPY 0 0 0 0

8 rows selected.

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 47: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

47

RMAN> delete noprompt obsolete;

RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1using channel ORA_DISK_1Deleting the following obsolete backups and copies:Type Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------Backup Set 22 15-DEC-17 Backup Piece 22 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj49_.bkpBackup Set 21 15-DEC-17 Backup Piece 21 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj50_.bkpBackup Set 20 15-DEC-17 Backup Piece 20 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj7l_.bkpBackup Set 19 15-DEC-17 Backup Piece 19 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj9d_.bkpdeleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj49_.bkp RECID=22 STAMP=962786704deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj50_.bkp RECID=21 STAMP=962786704deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj7l_.bkp RECID=20 STAMP=962786704deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f366rj9d_.bkp RECID=19 STAMP=962786704

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 48: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

48

Deleted 4 objects

RMAN>

SQL> select name, floor(space_limit / 1024 / 1024) "Size MB", ceil(space_used / 1024 / 1024) "Used MB"from v$recovery_file_dest; 2 3 4 5 NAME Size MB Used MB------------------------------------------------------------ ---------- ----------/u01/app/oracle/fast_recovery_area/orcl 8016 1110

SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID----------------------- ------------------ ------------------------- --------------- ----------CONTROL FILE 0 0 0 0REDO LOG 0 0 0 0ARCHIVED LOG 0 0 0 0BACKUP PIECE 13.84 0 12 0IMAGE COPY 0 0 0 0FLASHBACK LOG 0 0 0 0FOREIGN ARCHIVED LOG 0 0 0 0AUXILIARY DATAFILE COPY 0 0 0 0

8 rows selected.

SQL>

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 49: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

49

RMAN> report obsolete;

RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1no obsolete backups found

Backup Copies

RMAN> backup as copy database tag 'db_copy';

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting datafile copyinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f368q01w_.dbf tag=DB_COPY RECID=1 STAMP=962788710channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channel ORA_DISK_1: starting datafile copyinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f368q7ct_.dbf tag=DB_COPY RECID=2 STAMP=962788715channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channel ORA_DISK_1: starting datafile copyinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f368qgm8_.dbf tag=DB_COPY RECID=3 STAMP=962788718channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01channel ORA_DISK_1: starting datafile copy

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 50: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

50

input datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f368qhoc_.dbf tag=DB_COPY RECID=4 STAMP=962788719channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962788720_f368qk0r_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

RMAN> list copy of database;

List of Datafile Copies=======================

Key File S Completion Time Ckp SCN Ckp Time Sparse------- ---- - --------------- ---------- --------------- ------1 1 A 15-DEC-17 1426968 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f368q01w_.dbf Tag: DB_COPY

2 3 A 15-DEC-17 1426971 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f368q7ct_.dbf Tag: DB_COPY

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 51: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

51

3 4 A 15-DEC-17 1426979 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f368qgm8_.dbf Tag: DB_COPY

4 7 A 15-DEC-17 1426980 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f368qhoc_.dbf Tag: DB_COPY

RMAN>

SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID----------------------- ------------------ ------------------------- --------------- ----------CONTROL FILE 0 0 0 0REDO LOG 0 0 0 0ARCHIVED LOG 0 0 0 0BACKUP PIECE 13.97 12.82 13 0IMAGE COPY 16.78 0 4 0FLASHBACK LOG 0 0 0 0FOREIGN ARCHIVED LOG 0 0 0 0AUXILIARY DATAFILE COPY 0 0 0 0

8 rows selected.

SQL>

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 52: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

52

Validate Database

RMAN> validate database;

Starting validate at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting validation of datafilechannel ORA_DISK_1: specifying datafile(s) for validationinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: validation complete, elapsed time: 00:00:07List of Datafiles=================File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------1 OK 0 17286 102402 1426887 File Name: /u01/app/oracle/oradata/orcl/system01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 0 67661 Index 0 12538 Other 0 4915

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------3 OK 0 17160 60265 1426977 File Name: /u01/app/oracle/oradata/orcl/sysaux01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 0 4118 Index 0 2951

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 53: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

53

Other 0 35931

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------4 OK 0 673 8960 1426977 File Name: /u01/app/oracle/oradata/orcl/undotbs01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 0 0 Index 0 0 Other 0 8287

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------7 OK 0 1 641 30002 File Name: /u01/app/oracle/oradata/orcl/users01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 0 0 Index 0 0 Other 0 639

channel ORA_DISK_1: starting validation of datafilechannel ORA_DISK_1: specifying datafile(s) for validationincluding current control file for validationincluding current SPFILE in backup setchannel ORA_DISK_1: validation complete, elapsed time: 00:00:02List of Control File and SPFILE===============================File Type Status Blocks Failing Blocks Examined------------ ------ -------------- ---------------SPFILE OK 0 2 Control File OK 0 646

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 54: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

54

Finished validate at 15-DEC-17

RMAN>

Incremental Backups

RMAN> backup incremental level 0 database;

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 0 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd0_TAG20171215T092308_f368zwn7_.bkp tag=TAG20171215T092308 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789003_f3690cw9_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17RMAN> backup incremental level 1 database;

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 55: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

55

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T092401_f3691kbg_.bkp tag=TAG20171215T092401 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:07Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789048_f3691rn9_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN> backup incremental level 1 database;

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbf

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 56: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

56

channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T092425_f36929m6_.bkp tag=TAG20171215T092425 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:07Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789072_f3692jx3_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

SQL> select file#, avg(datafile_blocks), avg(blocks_read), avg(blocks_read/datafile_blocks) * 100as "% read for backup"from v$backup_datafilewhere incremental_level > 0 group by file# order by file#; 2 3 4 5

FILE# AVG(DATAFILE_BLOCKS) AVG(BLOCKS_READ) % read for backup---------- -------------------- ---------------- -----------------

1 102400 101952 99.5625 3 60160 57024 94.787234 4 8960 4352 48.5714286 7 640 128 20

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 57: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

57

SQL> alter database enable block change tracking using file '/u01/app/oracle/oradata/orcl/blk_chng_trk01.dbf';

Database altered.

SQL> select filename,status from v$block_change_tracking;

FILENAME----------------------------------------------------------------------------------------------------STATUS----------/u01/app/oracle/oradata/orcl/blk_chng_trk01.dbfENABLED

RMAN> backup incremental level 0 database;

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 0 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 58: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

58

piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd0_TAG20171215T092927_f369cqrc_.bkp tag=TAG20171215T092927 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789382_f369d6xl_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN> backup incremental level 1 database;

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T093007_f369dzxd_.bkp tag=TAG20171215T093007 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789408_f369f169_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 59: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

59

RMAN> backup incremental level 1 database;

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T093016_f369f8qn_.bkp tag=TAG20171215T093016 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789417_f369fb2z_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

SQL> select file#, avg(datafile_blocks), avg(blocks_read), avg(blocks_read/datafile_blocks) * 100 as "% read for backup" from v$backup_datafile where incremental_level > 0

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 60: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

60

and used_change_tracking = 'YES' group by file# order by file#; 2 3 4 5 6

FILE# AVG(DATAFILE_BLOCKS) AVG(BLOCKS_READ) % read for backup---------- -------------------- ---------------- -----------------

1 102400 1 .000976563 3 60160 1 .001662234 4 8960 1 .011160714 7 640 1 .15625

Incrementally Updateable Backups

RMAN> delete copy of database;

released channel: ORA_DISK_1allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=68 device type=DISKList of Datafile Copies=======================

Key File S Completion Time Ckp SCN Ckp Time Sparse------- ---- - --------------- ---------- --------------- ------1 1 A 15-DEC-17 1426968 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f368q01w_.dbf Tag: DB_COPY

2 3 A 15-DEC-17 1426971 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f368q7ct_.dbf Tag: DB_COPY

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 61: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

61

3 4 A 15-DEC-17 1426979 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f368qgm8_.dbf Tag: DB_COPY

4 7 A 15-DEC-17 1426980 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f368qhoc_.dbf Tag: DB_COPY

Do you really want to delete the above objects (enter YES or NO)? yesdeleted datafile copydatafile copy file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f368q01w_.dbf RECID=1 STAMP=962788710deleted datafile copydatafile copy file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f368q7ct_.dbf RECID=2 STAMP=962788715deleted datafile copydatafile copy file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f368qgm8_.dbf RECID=3 STAMP=962788718deleted datafile copydatafile copy file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f368qhoc_.dbf RECID=4 STAMP=962788719Deleted 4 objects

RMAN>

RMAN> RUN{ RECOVER COPY OF DATABASE WITH TAG 'oss_bkp';

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 62: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

62

BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'oss_bkp' DATABASE;}2> 3> 4> 5> 6> 7> 8> 9>

Starting recover at 15-DEC-17using channel ORA_DISK_1no copy of datafile 1 found to recoverno copy of datafile 3 found to recoverno copy of datafile 4 found to recoverno copy of datafile 7 found to recoverFinished recover at 15-DEC-17

Starting backup at 15-DEC-17using channel ORA_DISK_1no parent backup or copy of datafile 1 foundno parent backup or copy of datafile 3 foundno parent backup or copy of datafile 4 foundno parent backup or copy of datafile 7 foundchannel ORA_DISK_1: starting datafile copyinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f36moc8x_.dbf tag=OSS_BKP RECID=5 STAMP=962799921channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channel ORA_DISK_1: starting datafile copyinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f36molj2_.dbf tag=OSS_BKP RECID=6 STAMP=962799926channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 63: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

63

channel ORA_DISK_1: starting datafile copyinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f36mosp7_.dbf tag=OSS_BKP RECID=7 STAMP=962799929channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01channel ORA_DISK_1: starting datafile copyinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f36mottt_.dbf tag=OSS_BKP RECID=8 STAMP=962799930channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799931_f36mow4r_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN> RUN{ RECOVER COPY OF DATABASE WITH TAG 'oss_bkp'; BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'oss_bkp' DATABASE;}2> 3> 4> 5> 6> 7> 8> 9>

Starting recover at 15-DEC-17using channel ORA_DISK_1no copy of datafile 1 found to recover

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 64: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

64

no copy of datafile 3 found to recoverno copy of datafile 4 found to recoverno copy of datafile 7 found to recoverFinished recover at 15-DEC-17

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mp5y6_.bkp tag=OSS_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799943_f36mp79v_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN> RUN{ RECOVER COPY OF DATABASE WITH TAG 'oss_bkp'; BACKUP

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 65: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

65

INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'oss_bkp' DATABASE;}2> 3> 4> 5> 6> 7> 8> 9>

Starting recover at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental datafile backup set restorechannel ORA_DISK_1: specifying datafile copies to recoverrecovering datafile copy file number=00001 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f36moc8x_.dbfrecovering datafile copy file number=00003 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f36molj2_.dbfrecovering datafile copy file number=00004 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f36mosp7_.dbfrecovering datafile copy file number=00007 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f36mottt_.dbfchannel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mp5y6_.bkpchannel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mp5y6_.bkp tag=OSS_BKPchannel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01Finished recover at 15-DEC-17

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 66: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

66

channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mpmpq_.bkp tag=OSS_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799956_f36mpo0s_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID----------------------- ------------------ ------------------------- --------------- ----------CONTROL FILE 0 0 0 0REDO LOG 0 0 0 0ARCHIVED LOG 0 0 0 0BACKUP PIECE 40.69 38.41 30 0IMAGE COPY 16.78 0 4 0FLASHBACK LOG 0 0 0 0FOREIGN ARCHIVED LOG 0 0 0 0AUXILIARY DATAFILE COPY 0 0 0 0

8 rows selected.

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 67: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

67

SQL>

RMAN> RUN{ RECOVER COPY OF DATABASE WITH TAG 'oss_bkp'; BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'oss_bkp' DATABASE; DELETE NOPROMPT OBSOLETE;}2> 3> 4> 5> 6> 7> 8> 9> 10>

Starting recover at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental datafile backup set restorechannel ORA_DISK_1: specifying datafile copies to recoverrecovering datafile copy file number=00001 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f36moc8x_.dbfrecovering datafile copy file number=00003 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f36molj2_.dbfrecovering datafile copy file number=00004 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f36mosp7_.dbfrecovering datafile copy file number=00007 name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f36mottt_.dbfchannel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mpmpq_.bkpchannel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mpmpq_.bkp tag=OSS_BKPchannel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01Finished recover at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 68: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

68

Starting backup at 15-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting incremental level 1 datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36nssj5_.bkp tag=OSS_BKP comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962801082_f36nstpz_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1using channel ORA_DISK_1Deleting the following obsolete backups and copies:Type Key Completion Time Filename/Handle-------------------- ------ ------------------ --------------------Backup Set 24 15-DEC-17 Backup Piece 24 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367wn3r_.bkpBackup Set 25 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 69: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

69

Backup Piece 25 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367wvo4_.bkpBackup Set 26 15-DEC-17 Backup Piece 26 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367x2l1_.bkpBackup Set 27 15-DEC-17 Backup Piece 27 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367x3os_.bkpBackup Set 30 15-DEC-17 Backup Piece 30 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd0_TAG20171215T092308_f368zwn7_.bkpBackup Set 32 15-DEC-17 Backup Piece 32 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T092401_f3691kbg_.bkpBackup Set 34 15-DEC-17 Backup Piece 34 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T092425_f36929m6_.bkpBackup Set 36 15-DEC-17 Backup Piece 36 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd0_TAG20171215T092927_f369cqrc_.bkpBackup Set 38 15-DEC-17 Backup Piece 38 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T093007_f369dzxd_.bkpBackup Set 40 15-DEC-17 Backup Piece 40 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T093016_f369f8qn_.bkpBackup Set 43 15-DEC-17 Backup Piece 43 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mp5y6_.bkpBackup Set 45 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 70: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

70

Backup Piece 45 15-DEC-17 /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mpmpq_.bkpdeleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367wn3r_.bkp RECID=24 STAMP=962787860deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367wvo4_.bkp RECID=25 STAMP=962787867deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367x2l1_.bkp RECID=26 STAMP=962787874deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnndf_DAILY_DB_BKP_f367x3os_.bkp RECID=27 STAMP=962787875deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd0_TAG20171215T092308_f368zwn7_.bkp RECID=30 STAMP=962788988deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T092401_f3691kbg_.bkp RECID=32 STAMP=962789041deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T092425_f36929m6_.bkp RECID=34 STAMP=962789065deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd0_TAG20171215T092927_f369cqrc_.bkp RECID=36 STAMP=962789367deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T093007_f369dzxd_.bkp RECID=38 STAMP=962789407deleted backup piece

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 71: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

71

backup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_TAG20171215T093016_f369f8qn_.bkp RECID=40 STAMP=962789416deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mp5y6_.bkp RECID=43 STAMP=962799941deleted backup piecebackup piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36mpmpq_.bkp RECID=45 STAMP=962799955Deleted 12 objects

RMAN> list backup of datafile 1;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------47 Incr 1 560.00K DISK 00:00:00 15-DEC-17 BP Key: 47 Status: AVAILABLE Compressed: NO Tag: OSS_BKP Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36nssj5_.bkp List of Datafiles in backup set 47 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 1 Incr 1434831 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf

RMAN> list copy of datafile 1;

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 72: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

72

List of Datafile Copies=======================

Key File S Completion Time Ckp SCN Ckp Time Sparse------- ---- - --------------- ---------- --------------- ------13 1 A 15-DEC-17 1434138 15-DEC-17 NO Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f36moc8x_.dbf Tag: OSS_BKP

RMAN> restore datafile 1 validate;

Starting restore at 15-DEC-17using channel ORA_DISK_1

channel ORA_DISK_1: scanning datafile copy /u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f36moc8x_.dbfFinished restore at 15-DEC-17

SQL> SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID----------------------- ------------------ ------------------------- --------------- ----------CONTROL FILE 0 0 0 0REDO LOG 0 0 0 0ARCHIVED LOG 0 0 0 0BACKUP PIECE 2.42 0 20 0IMAGE COPY 16.78 0 4 0FLASHBACK LOG 0 0 0 0FOREIGN ARCHIVED LOG 0 0 0 0

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 73: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

73

AUXILIARY DATAFILE COPY 0 0 0 0

8 rows selected.

SQL>

RMAN> list backup of controlfile completed after 'sysdate-1/24';

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------42 Full 10.19M DISK 00:00:01 15-DEC-17 BP Key: 42 Status: AVAILABLE Compressed: NO Tag: TAG20171215T122531 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799931_f36mow4r_.bkp Control File Included: Ckp SCN: 1434050 Ckp time: 15-DEC-17

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------44 Full 10.19M DISK 00:00:00 15-DEC-17 BP Key: 44 Status: AVAILABLE Compressed: NO Tag: TAG20171215T122543 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799943_f36mp79v_.bkp Control File Included: Ckp SCN: 1434089 Ckp time: 15-DEC-17

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------46 Full 10.19M DISK 00:00:01 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 74: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

74

BP Key: 46 Status: AVAILABLE Compressed: NO Tag: TAG20171215T122556 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799956_f36mpo0s_.bkp Control File Included: Ckp SCN: 1434145 Ckp time: 15-DEC-17

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------48 Full 10.19M DISK 00:00:00 15-DEC-17 BP Key: 48 Status: AVAILABLE Compressed: NO Tag: TAG20171215T124442 Piece Name: /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962801082_f36nstpz_.bkp Control File Included: Ckp SCN: 1434839 Ckp time: 15-DEC-17

Backup Fast Recovery Area

[oracle@host01 ~]$ mkdir /u01/app/fra_backup[oracle@host01 ~]$ rman target /

RMAN> backup recovery area to destination '/u01/app/fra_backup/';

Starting backup at 15-DEC-17using target database control file instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: SID=24 device type=DISKchannel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: including datafile copy of datafile 00001 in backup setinput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f36moc8x_.dbfchannel ORA_DISK_1: including datafile copy of datafile 00003 in backup setinput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f36molj2_.dbfchannel ORA_DISK_1: including datafile copy of datafile 00004 in backup setinput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f36mosp7_.dbf

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 75: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

75

channel ORA_DISK_1: including datafile copy of datafile 00007 in backup setinput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f36mottt_.dbfchannel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T130019_f36oq3bq_.bkp tag=TAG20171215T130019 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15channel ORA_DISK_1: starting archived log backup setchannel ORA_DISK_1: specifying archived log(s) in backup setinput archived log thread=1 sequence=15 RECID=15 STAMP=962801831channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: finished piece 1 at 15-DEC-17piece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T130019_f36oqlhl_.bkp tag=TAG20171215T130019 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=2, stamp=962784118, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784118_f3647pns_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T080158_f36oqmlj_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=4, stamp=962784495, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784495_f364mj19_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T080815_f36oqnoj_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=6, stamp=962784614, piece=1

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 76: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

76

channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962784614_f364q6ys_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T081014_f36oqor7_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=10, stamp=962785184, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962785184_f36590x4_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T081944_f36oqptp_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=14, stamp=962785795, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962785795_f365w39n_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T082955_f36oqqx3_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=18, stamp=962785946, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962785946_f3660v6q_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T083226_f36oqs08_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=23, stamp=962786719, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 77: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

77

channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962786719_f366s032_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T084519_f36oqt2m_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=28, stamp=962787876, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962787876_f367x51y_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T090436_f36oqv5t_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=33, stamp=962788720, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962788720_f368qk0r_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T091840_f36oqw8n_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=37, stamp=962789003, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789003_f3690cw9_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T092323_f36oqxc2_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=39, stamp=962789048, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789048_f3691rn9_.bkp

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 78: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

78

piece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T092408_f36oqyfr_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=41, stamp=962789072, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789072_f3692jx3_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T092432_f36oqzk4_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=43, stamp=962789382, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789382_f369d6xl_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T092942_f36or0mq_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=45, stamp=962789408, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789408_f369f169_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T093008_f36or1p6_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=47, stamp=962789417, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962789417_f369fb2z_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T093017_f36or2rr_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 79: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

79

channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=52, stamp=962799931, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799931_f36mow4r_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T122531_f36or3vs_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=54, stamp=962799943, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799943_f36mp79v_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T122543_f36or4yj_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=56, stamp=962799956, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962799956_f36mpo0s_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T122556_f36or62f_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=57, stamp=962801081, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36nssj5_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36or74q_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=58, stamp=962801082, piece=1

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 80: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

80

channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962801082_f36nstpz_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T124442_f36or87f_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=59, stamp=962801831, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T125711_f36ok7gm_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_annnn_TAG20171215T125711_f36or9b8_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01channel ORA_DISK_1: input backup set: count=60, stamp=962801832, piece=1channel ORA_DISK_1: starting piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962801832_f36ok8st_.bkppiece handle=/u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_ncsnf_TAG20171215T125712_f36orbfh_.bkp comment=NONEchannel ORA_DISK_1: finished piece 1 at 15-DEC-17channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:01Finished backup at 15-DEC-17

Starting Control File and SPFILE Autobackup at 15-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_15/o1_mf_s_962802059_f36orct8_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 15-DEC-17

RMAN>

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 81: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

81

RMAN> list backup of datafile 1;

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

BS Key Type LV Size------- ---- -- ----------47 Incr 1 560.00K List of Datafiles in backup set 47 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 1 Incr 1434831 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf

Backup Set Copy #1 of backup set 47 Device Type Elapsed Time Completion Time Compressed Tag ----------- ------------ --------------- ---------- --- DISK 00:00:00 15-DEC-17 NO OSS_BKP

List of Backup Pieces for backup set 47 Copy #1 BP Key Pc# Status Piece Name ------- --- ----------- ---------- 47 1 AVAILABLE /u01/app/oracle/fast_recovery_area/orcl/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36nssj5_.bkp

Backup Set Copy #2 of backup set 47 Device Type Elapsed Time Completion Time Compressed Tag ----------- ------------ --------------- ---------- --- DISK 00:00:00 15-DEC-17 NO OSS_BKP

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 82: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

82

List of Backup Pieces for backup set 47 Copy #2 BP Key Pc# Status Piece Name ------- --- ----------- ---------- 71 1 AVAILABLE /u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_nnnd1_OSS_BKP_f36or74q_.bkp

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------51 Full 1.03G DISK 00:00:08 15-DEC-17 BP Key: 51 Status: AVAILABLE Compressed: NO Tag: TAG20171215T130019 Piece Name: /u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T130019_f36oq3bq_.bkp List of Datafiles in backup set 51 File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 Full 1434138 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf

RMAN>

Creating a Recovery Catalog

SQL> create user rco identified by oracle;

User created.

SQL> grant recovery_catalog_owner to rco;

Grant succeeded.

SQL> alter user rco quota unlimited on users

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 83: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

83

2 temporary tablespace temp;

User altered.

[oracle@host01 amer]$ rman catalog rco/oracle@amer

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Dec 15 23:40:51 2017

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

connected to recovery catalog database

RMAN> create catalog tablespace users;

recovery catalog created

[oracle@host01 amer]$ rman target / catalog rco/oracle@amer

Recovery Manager: Release 12.2.0.1.0 - Production on Fri Dec 15 23:45:27 2017

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

connected to target database: ORCL (DBID=1490563868)connected to recovery catalog database

RMAN> register database;

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 84: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

84

database registered in recovery catalogstarting full resync of recovery catalogfull resync complete

RMAN> list backup of database summary;

List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---181 B 1 A DISK 15-DEC-17 1 2 NO OSS_BKP185 B F A DISK 15-DEC-17 1 1 NO TAG20171215T130019

RMAN> list backupset 185;

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

BS Key Type LV Size Device Type Elapsed Time Completion Time------- ---- -- ---------- ----------- ------------ ---------------185 Full 1.03G DISK 00:00:08 15-DEC-17 BP Key: 210 Status: AVAILABLE Compressed: NO Tag: TAG20171215T130019 Piece Name: /u01/app/fra_backup/ORCL/backupset/2017_12_15/o1_mf_nnndf_TAG20171215T130019_f36oq3bq_.bkp List of Datafiles in backup set 185

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 85: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

85

File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name ---- -- ---- ---------- --------- ----------- ------ ---- 1 Full 1434138 15-DEC-17 NO /u01/app/oracle/oradata/orcl/system01.dbf 3 Full 1434138 15-DEC-17 NO /u01/app/oracle/oradata/orcl/sysaux01.dbf 4 Full 1434138 15-DEC-17 NO /u01/app/oracle/oradata/orcl/undotbs01.dbf 7 Full 1434138 15-DEC-17 NO /u01/app/oracle/oradata/orcl/users01.dbf

RMAN>

[oracle@host01 amer]$ sqlplus rco/oracle@amer

SQL> select db_key,dbid,name from rc_database;

DB_KEY DBID NAME---------- ---------- --------

1 1490563868 ORCL

Create Recovery Catalog Scripts

[oracle@host01 ORCL]$ rman target / catalog rco/oracle@amer

Recovery Manager: Release 12.2.0.1.0 - Production on Sun Dec 17 22:25:08 2017

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

connected to target database: ORCL (DBID=1490783443)connected to recovery catalog database

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 86: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

86

RMAN> CREATE GLOBAL SCRIPT global_oss_backup { RECOVER COPY OF DATABASE WITH TAG 'oss_bkp'; BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'oss_bkp' DATABASE;}RMAN> 2> 3> 4> 5> 6> 7> 8> 9>

created global script global_oss_backup

RMAN> run 2> {execute global script global_oss_backup;3> }

executing global script: global_oss_backup

Starting recover at 17-DEC-17allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=49 device type=DISKno copy of datafile 1 found to recoverno copy of datafile 3 found to recoverno copy of datafile 4 found to recoverno copy of datafile 7 found to recoverFinished recover at 17-DEC-17

Starting backup at 17-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 87: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

87

using channel ORA_DISK_1no parent backup or copy of datafile 1 foundno parent backup or copy of datafile 3 foundno parent backup or copy of datafile 4 foundno parent backup or copy of datafile 7 foundchannel ORA_DISK_1: starting datafile copyinput datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_system_f3dzpy7s_.dbf tag=OSS_BKP RECID=1 STAMP=963008868channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channel ORA_DISK_1: starting datafile copyinput datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_sysaux_f3dzq5fp_.dbf tag=OSS_BKP RECID=2 STAMP=963008873channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channel ORA_DISK_1: starting datafile copyinput datafile file number=00004 name=/u01/app/oracle/oradata/orcl/undotbs01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_undotbs1_f3dzqdq9_.dbf tag=OSS_BKP RECID=3 STAMP=963008877channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01channel ORA_DISK_1: starting datafile copyinput datafile file number=00007 name=/u01/app/oracle/oradata/orcl/users01.dbfoutput file name=/u01/app/oracle/fast_recovery_area/orcl/ORCL/datafile/o1_mf_users_f3dzqg01_.dbf tag=OSS_BKP RECID=4 STAMP=963008878channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01Finished backup at 17-DEC-17

Starting Control File and SPFILE Autobackup at 17-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/orcl/ORCL/autobackup/2017_12_17/o1_mf_s_963008879_f3dzqjb5_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 17-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 88: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

88

RMAN>

Backup of Multitenant Container Database

[oracle@host01 ~]$ rman target / catalog rco/oracle@amer

Recovery Manager: Release 12.2.0.1.0 - Production on Sun Dec 17 14:02:44 2017

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

connected to target database: CDB1 (DBID=936644635)connected to recovery catalog database

RMAN> register database;

database registered in recovery catalogstarting full resync of recovery catalogfull resync complete

RMAN> backup database;

Starting backup at 17-DEC-17allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=65 device type=DISKchannel ORA_DISK_1: starting full datafile backup set

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 89: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

89

channel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00001 name=/u01/app/oracle/oradata/cdb1/system01.dbfinput datafile file number=00003 name=/u01/app/oracle/oradata/cdb1/sysaux01.dbfinput datafile file number=00004 name=/u01/app/oracle/oradata/cdb1/undotbs01.dbfinput datafile file number=00007 name=/u01/app/oracle/oradata/cdb1/users01.dbfchannel ORA_DISK_1: starting piece 1 at 17-DEC-17channel ORA_DISK_1: finished piece 1 at 17-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/cdb1/CDB1/backupset/2017_12_17/o1_mf_nnndf_TAG20171217T140355_f3d26f2k_.bkp tag=TAG20171217T140355 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00010 name=/u01/app/oracle/oradata/cdb1/pdb1/sysaux01.dbfinput datafile file number=00009 name=/u01/app/oracle/oradata/cdb1/pdb1/system01.dbfinput datafile file number=00011 name=/u01/app/oracle/oradata/cdb1/pdb1/undotbs01.dbfinput datafile file number=00012 name=/u01/app/oracle/oradata/cdb1/pdb1/users01.dbfchannel ORA_DISK_1: starting piece 1 at 17-DEC-17channel ORA_DISK_1: finished piece 1 at 17-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/cdb1/CDB1/60781CC8D2B315DCE0536438A8C03FCB/backupset/2017_12_17/o1_mf_nnndf_TAG20171217T140355_f3d26y9z_.bkp tag=TAG20171217T140355 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:15channel ORA_DISK_1: starting full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00006 name=/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbfinput datafile file number=00005 name=/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbfinput datafile file number=00008 name=/u01/app/oracle/oradata/cdb1/pdbseed/undotbs01.dbfchannel ORA_DISK_1: starting piece 1 at 17-DEC-17channel ORA_DISK_1: finished piece 1 at 17-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/cdb1/CDB1/60780803FFBF0ED8E0536438A8C0E419/backupset/2017_12_17/o1_mf_nnndf_TAG20171217T140355_f3d27c4r_.bkp tag=TAG20171217T140355 comment=NONE

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 90: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

90

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15Finished backup at 17-DEC-17

Starting Control File and SPFILE Autobackup at 17-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/cdb1/CDB1/autobackup/2017_12_17/o1_mf_s_962978683_f3d27w2s_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 17-DEC-17

RMAN> backup as compressed backupset pluggable database pdb1;

Starting backup at 17-DEC-17using channel ORA_DISK_1channel ORA_DISK_1: starting compressed full datafile backup setchannel ORA_DISK_1: specifying datafile(s) in backup setinput datafile file number=00010 name=/u01/app/oracle/oradata/cdb1/pdb1/sysaux01.dbfinput datafile file number=00009 name=/u01/app/oracle/oradata/cdb1/pdb1/system01.dbfinput datafile file number=00011 name=/u01/app/oracle/oradata/cdb1/pdb1/undotbs01.dbfinput datafile file number=00012 name=/u01/app/oracle/oradata/cdb1/pdb1/users01.dbfchannel ORA_DISK_1: starting piece 1 at 17-DEC-17channel ORA_DISK_1: finished piece 1 at 17-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/cdb1/CDB1/60781CC8D2B315DCE0536438A8C03FCB/backupset/2017_12_17/o1_mf_nnndf_TAG20171217T140510_f3d28ps5_.bkp tag=TAG20171217T140510 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:35Finished backup at 17-DEC-17

Starting Control File and SPFILE Autobackup at 17-DEC-17piece handle=/u01/app/oracle/fast_recovery_area/cdb1/CDB1/autobackup/2017_12_17/o1_mf_s_962978749_f3d29y25_.bkp comment=NONEFinished Control File and SPFILE Autobackup at 17-DEC-17

Backup and Recovery Workshop Lab Exercise One (Backups)

Page 91: Knowledge is Power – share IT · Web viewData Guard and Backup and Recovery Workshop Part Two (Backup and Recovery) Lab Exercise One Configuring RMAN Performing database full backups

91

RMAN>

RMAN> list backup of database root summary;

List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---1339 B F A DISK 17-DEC-17 1 1 NO TAG20171217T140355

RMAN> list backup of pluggable database pdb1 summary;

List of Backups===============Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag------- -- -- - ----------- --------------- ------- ------- ---------- ---1340 B F A DISK 17-DEC-17 1 1 NO TAG20171217T1403551394 B F A DISK 17-DEC-17 1 1 YES TAG20171217T140510

Backup and Recovery Workshop Lab Exercise One (Backups)