iSelfSchooling.com  Since 1999     References  |  Search more  | Oracle Syntax  | Free Online Oracle Training

    Home      .Services     Login       Start Learning     Certification      .                 .Share your BELIEF(s)...

 

. Online Accounting        .Copyright & User Agreement   |
    .Vision      .Biography     .Acknowledgement

.Contact Us      .Comments/Suggestions       Email2aFriend    |

 

Online Oracle Training for beginners and advanced - The most comprehensive Oracle tutorial

The authors do not guarantee or take any responsibility for the accuracy, or completeness of the information.

DBAs - Fundamentals II

 

Lesson 01 | Lesson 02 | Lesson 03 | Lesson 04 | Lesson 05 | Lesson 06 | Lesson 07 | Lesson 08 | Lesson 09 | Lesson 10 | Lesson 11 | Lesson 12 | Lesson 13 | Lesson 14 | Lesson 15 | Lesson 16 | Lesson 17 | Lesson 18 | Lesson 19 | Lesson 20 | Lesson 21 | Lesson 22 | Lesson 23 | Lesson 24 | Lesson 25 | Lesson 26 | Lesson 27 | Lesson 28 | Lesson 29 |

 

Lesson 22

"It is through creating, not possessing, that life is revealed." Vida D. Scudder

 

Read first then play the video:

   DBA-VIDEO -RMAN Managed the LIST and REPORT commands

   

RMAN-Managed the LIST and REPORT commands

Introduction

As a DBA, you are responsible for obtaining backup information using the LIST and REPORT commands. Your job"s responsibilities dictate that you should at least be informed of the following basic fundamental subjects:

 

Performing the LIST and REPORT commands

Creating a RMAN script

Replacing a RMAN script

Deleting a RMAN script

Running a RMAN script

Connecting to the RMAN tool using the Recovery Catalog database

Listing all of the backup sets and the associated backup pieces

Listing all of the expired backup sets

Listing the backup of the data files for a tablespace

Listing a database incarnations registered in a database

Displaying objects that need a backup and a confirmed retention policy

Listing all of the backup sets and image copies that are OBSOLETE

Listing all of the schemas of the database that can be deleted

Commands:

RMAN> CONNECT CATALOG

RMAN> CONNECT TARGET

RMAN> LIST BACKUP;

RMAN> LIST EXPIRED BACKUPSET;

RMAN> LIST BACKUP

RMAN> LIST INCARNATION OF DATABASE;

RMAN> REPORT NEED BACKUP;

RMAN> REPORT OBSOLETE;

RMAN> REPORT SCHEMA;

RMAN> RUN

RMAN> REPLACE SCRIPT

RMAN> DELETE SCRIPT

RMAN> exit;

 

Hands-on

In this exercise we will learn how to perform the LIST and REPORT commands in the RMAN tool. Also, we'll learn how to create, replace, delete, and run a RMAN script.

First, let's connect to the SCHOOL database as the SYSTEM/MANAGER user.
SQL> CONNECT system/manager

Run the RMAN tool.
DOS> RMAN

Connect to the RMAN tool using the Recovery Catalog database.
RMAN> CONNECT CATALOG RMAN/password@dbs4RMAN

Connect to the target database.
RMAN> CONNECT TARGET system/manager@school


LIST command
List all of the backup sets and the associated backup pieces.
RMAN> LIST BACKUP;

List all of the expired backup sets.
RMAN> LIST EXPIRED BACKUPSET;

List the backup of the data files for the TOOLS tablespace.
RMAN> LIST BACKUP OF TABLESPACE tools;

List the database incarnations registered in the database.
RMAN> LIST INCARNATION OF DATABASE;


REPORT command
Display the objects that need a backup and confirm the retention policy.
RMAN> REPORT NEED BACKUP;

List all of the backup sets and image copies that are OBSOLETE and can be deleted.
RMAN> REPORT OBSOLETE;

List all of the schemas of the database that can be deleted.
RMAN> REPORT SCHEMA;


Create a script
Create a RMAN script and name it BACKUP_TOOLS, since it is backing up only the TOOLS tablespace.
RMAN>

CREATE SCRIPT backup_tools
{
     BACKUP TABLESPACE tools;
}


Execute a script
Run the BACKUP_TOOLS script.
RMAN> RUN {EXECUTE SCRIPT backup_tools;}


Modify a script
Change or replace the BACKUP_TOOLS script to not only back up the TOOLS tablespace, but also back up the archive log files.
RMAN>

REPLACE SCRIPT backup_tools
{
     BACKUP TABLESPACE tools PLUS ARCHIVELOG;
}

Delete a script

Delete the BACKUP_TOOLS script.
RMAN> DELETE SCRIPT backup_tools;

Exit the RMAN.
RMAN> exit;

 

"Read, every day, something no one else is reading. Think, every day, something no one else is thinking. Do, every day, something no one else would be silly enough to do. It is bad for the mind to be always part of unanimity." Christopher Morley (1890 - 1957)

 

Questions:

Q: How do you perform a LIST and REPORT commands in the RMAN tool?

Q: How do you write a RMAN script?

Q: How do you replace a RMAN script?

Q: How do you delete a RMAN script?

Q: How do you run a RMAN script?

Q: How do you get a list of the backup of the datafiles for a tablespace?

Q: How do you get a list of objects that need backup?

Q: How do you get a list of objects with their confirmed retention policy?

Q: How do you get a list of a database incarnations?

Q: How do you get a list of the backup sets that are obsolete?

Q: How do you get a list of the image copies that are obsolete?

Q: How do you get a list of the schemas that can be deleted?

Q: What do the following RMAN commands do?

RMAN> CONNECT CATALOG RMAN/password@dbs4RMAN
RMAN> LIST BACKUP;
RMAN> LIST EXPIRED BACKUPSET;
RMAN> LIST BACKUP OF TABLESPACE tools;
RMAN> LIST INCARNATION OF DATABASE;

RMAN> REPORT NEED BACKUP;
RMAN> REPORT OBSOLETE;
RMAN> REPORT SCHEMA;

RMAN> CREATE SCRIPT backup_tools
{
     BACKUP TABLESPACE tools;
}

RMAN> RUN {EXECUTE SCRIPT backup_tools;}

RMAN> REPLACE SCRIPT backup_tools
{
     BACKUP TABLESPACE tools PLUS ARCHIVELOG;
}

RMAN> DELETE SCRIPT backup_tools;