• No results found

Exit the RMAN client and cleanup your test data by executing the cleanup_06_02.sh script, which removes the INVENTORY tablespace and the INVENTORY user.

In document D78850GC20_ag (Page 84-91)

Practices for Lesson 6: Overview Practices Overview

Practice 6-2: Using Incremental Backup Overview

7. Exit the RMAN client and cleanup your test data by executing the cleanup_06_02.sh script, which removes the INVENTORY tablespace and the INVENTORY user.

RMAN> exit

$ ./cleanup_06_02.sh $

8. Optionally, use another terminal window to view the output in the /tmp/cleanup.log file while the script is executing.

$ cat /tmp/cleanup.log

SQL*Plus: Release 12.1.0.2.0 Production on Wed Dec 10 13:40:05 2014

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

SQL> Connected. SQL>

User dropped.

SQL>

Tablespace dropped.

SQL> SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

Cleanup done. $

9. As SYSBACKUP, delete obsolete backups. $ rman target "'/ as sysbackup'"

RMAN> delete obsolete;

using target database control file instead of recovery catalog RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1 allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=40 device type=DISK

Deleting the following obsolete backups and copies:

Type Key Completion Time Filename/Handle --- --- --- --- --- Backup Set 3 2014-12-05:12:10:16 Backup Piece 3 2014-12-05:12:10:16 /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_12_05/o1_ mf_nnndf_TAG20141205T120952_b8384lhs_.bkp Backup Set 4 2014-12-05:12:10:20 Backup Piece 4 2014-12-05:12:10:20 /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_12_05/o1_ mf_ncsnf_TAG20141205T120952_b8385cno_.bkp Backup Set 5 2014-12-05:12:44:02 Backup Piece 5 2014-12-05:12:44:02 /u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_12_05/o1_ mf_nnndf_TAG20141205T124402_b83b4lc4_.bkp Archive Log 4 2014-12-09:10:05:13 /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_09/o1 _mf_1_20_b8flbrsh_.arc Backup Set 6 2014-12-05:12:44:04 Backup Piece 6 2014-12-05:12:44:04 /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_12_05/o1 _mf_s_865514643_b83b4n9r_.bkp Archive Log 5 2014-12-09:22:01:00 /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_09/o1 _mf_1_21_b8gw8v94_.arc Backup Set 7 2014-12-09:11:56:56 Backup Piece 7 2014-12-09:11:56:56 /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_12_09/o1 _mf_s_865857414_b8frw7pz_.bkp Archive Log 6 2014-12-09:23:01:02

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Practices for Lesson 6: Creating Backups

Archive Log 8 2014-12-10:12:34:03 /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_10/o1 _mf_1_24_b8jhfty6_.arc Archive Log 9 2014-12-10:12:34:36 /u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_10/o1 _mf_1_25_b8jhgvtb_.arc Backup Set 8 2014-12-10:12:39:13 Backup Piece 8 2014-12-10:12:39:13 /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_12_10/o1 _mf_s_865946352_b8jhqk38_.bkp Backup Set 9 2014-12-10:12:45:35 Backup Piece 9 2014-12-10:12:45:35 /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_12_10/o1 _mf_s_865946734_b8jj3hkg_.bkp Backup Set 11 2014-12-10:13:24:00 Backup Piece 11 2014-12-10:13:24:00 /u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_12_10/o1 _mf_s_865949039_b8jlcjmf_.bkp Datafile Copy 12 2014-12-10:13:33:33 /u01/backup/orcl/data_D-ORCL_I-1393010434_TS-INVENTORY_FNO- 2_0eppqj3c Datafile Copy 11 2014-12-10:13:33:33 /u01/backup/orcl/data_D-ORCL_I-1393010434_TS-INVENTORY_FNO- 7_0dppqj39

Do you really want to delete the above objects (enter YES or NO)? y

deleted backup piece backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_12 _05/o1_mf_nnndf_TAG20141205T120952_b8384lhs_.bkp RECID=3

STAMP=865512594 deleted backup piece backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_12 _05/o1_mf_ncsnf_TAG20141205T120952_b8385cno_.bkp RECID=4

STAMP=865512619 deleted backup piece backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2014_12 _05/o1_mf_nnndf_TAG20141205T124402_b83b4lc4_.bkp RECID=5

STAMP=865514642 deleted archived log archived log file

name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_ 09/o1_mf_1_20_b8flbrsh_.arc RECID=4 STAMP=865850713

deleted backup piece

backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_1 2_05/o1_mf_s_865514643_b83b4n9r_.bkp RECID=6 STAMP=865514644 deleted archived log

archived log file

name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_ 09/o1_mf_1_21_b8gw8v94_.arc RECID=5 STAMP=865893660

deleted backup piece backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_1 2_09/o1_mf_s_865857414_b8frw7pz_.bkp RECID=7 STAMP=865857415 deleted archived log

archived log file

name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_ 09/o1_mf_1_22_b8gzsfg2_.arc RECID=6 STAMP=865897262

deleted archived log archived log file

name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_ 10/o1_mf_1_23_b8jfgcsp_.arc RECID=7 STAMP=865944012

deleted archived log archived log file

name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_ 10/o1_mf_1_24_b8jhfty6_.arc RECID=8 STAMP=865946043

deleted archived log archived log file

name=/u01/app/oracle/fast_recovery_area/ORCL/archivelog/2014_12_ 10/o1_mf_1_25_b8jhgvtb_.arc RECID=9 STAMP=865946076

deleted backup piece backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_1 2_10/o1_mf_s_865946352_b8jhqk38_.bkp RECID=8 STAMP=865946353 deleted backup piece

backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_1 2_10/o1_mf_s_865946734_b8jj3hkg_.bkp RECID=9 STAMP=865946735 deleted backup piece

backup piece

handle=/u01/app/oracle/fast_recovery_area/ORCL/autobackup/2014_1 2_10/o1_mf_s_865949039_b8jlcjmf_.bkp RECID=11 STAMP=865949040 deleted datafile copy

datafile copy file name=/u01/backup/orcl/data_D-ORCL_I-

1393010434_TS-INVENTORY_FNO-2_0eppqj3c RECID=12 STAMP=865949613 deleted datafile copy

datafile copy file name=/u01/backup/orcl/data_D-ORCL_I-

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Practices for Lesson 6: Creating Backups

10. Optionally, crosscheck all data file copies of the ORCL database. Then exit. RMAN> crosscheck datafilecopy all;

released channel: ORA_DISK_1 allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=40 device type=DISK validation succeeded for datafile copy

datafile copy file name=/u01/backup/orcl/data_D-ORCL_I- 1393010434_TS-SYSTEM_FNO-1_0appqj1f RECID=9 STAMP=865949612 validation succeeded for datafile copy

datafile copy file name=/u01/backup/orcl/data_D-ORCL_I-

1393010434_TS-SYSAUX_FNO-3_0bppqj28 RECID=13 STAMP=865949615 validation succeeded for datafile copy

datafile copy file name=/u01/backup/orcl/data_D-ORCL_I-

1393010434_TS-UNDOTBS1_FNO-4_0cppqj32 RECID=10 STAMP=865949612 validation succeeded for datafile copy

datafile copy file name=/u01/backup/orcl/data_D-ORCL_I-

1393010434_TS-EXAMPLE_FNO-5_09ppqj0m RECID=14 STAMP=865949615 validation succeeded for datafile copy

datafile copy file name=/u01/backup/orcl/data_D-ORCL_I- 1393010434_TS-USERS_FNO-6_0fppqj3d RECID=8 STAMP=865949611 Crosschecked 5 objects

RMAN> exit $

Note: Five validated backup should remain.

11. Optionally, view your backups in Cloud Control.

a. Navigate from the orcl home page: Availability > Backup & Recovery > Backup Reports.

b. If needed, select NC_SYSDBA as your Named Credential for the database login. c. You can customize the View Backup Report page. By default, all types of backups are

displayed, sorted by start time in descending order.

Note: Some practices intentionally introduce errors for your learning purpose. Your output might look different, but it should have a mixture of COMPLETED and FAILED backups.

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Practices for Lesson 6: Creating Backups

Practices for Lesson 7:

In document D78850GC20_ag (Page 84-91)