Topics: RMAN-Managed the LIST and REPORT
commands
|
More Resources by
Google: |
|
|
|
|
Hands-On 09
(RMAN-Managed the LIST and REPORT commands)
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
l" style="margin-top: 0; margin-bottom: 0">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>
in-top: 0; margin-bottom: 0">RMAN>
REPORT OBSOLETE;
RMAN>
REPORT SCHEMA;
RMAN> RUN
RMAN> REPLACE SCRIPT
RMAN> DELETE SCRIPT
RMAN>
exit;
-- Hands-On 09 (RMAN-Managed the LIST and REPORT commands)
-- Preparation
SET ECHO ON
clear scr
connect system/manager as sysdba
SET linesize 1000 pagesize 55
COL name FORMAT a60
col description format a30
col tablespace_name format a15
col file_name format a45
pause
--Start
CLEAR SCR
-- 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.
pause
CONNECT system/manager
pause
CLEAR SCR
-- Run the RMAN tool.
--\/-- DOS> RMAN
pause
pause
-- Connect to the RMAN tool using the Recovery Catalog database.
--\/-- RMAN> CONNECT CATALOG RMAN/password@dbs4RMAN
pause
pause
-- Connect to the target database.
--\/-- RMAN> CONNECT TARGET system/manager@school
pause
pause
CLEAR SCR
-- List all of the backup sets and the associated backup pieces.
--\/-- RMAN> LIST BACKUP;
pause
pause
-- List all of the expired backup sets.
--\/-- RMAN> LIST EXPIRED BACKUPSET;
pause
pause
-- List the backup of the data files for the TOOLS tablespace.
--\/-- RMAN> LIST BACKUP OF TABLESPACE tools;
pause
pause
-- List the database incarnations registered in the database.
--\/-- RMAN> LIST INCARNATION OF DATABASE;
pause
pause
CLEAR SCR
-- Display the objects that need a backup and confirm the
-- retention policy.
--\/-- RMAN> REPORT NEED BACKUP;
pause
pause
-- List all of the backup sets and image copies that are OBSOLETE
-- and can be deleted.
--\/-- RMAN> REPORT OBSOLETE;
pause
pause
-- List all of the schemas of the database that can be deleted.
--\/-- RMAN> REPORT SCHEMA;
pause
pause
CLEAR SCR
-- 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;
--\/-- }
pause
pause
-- Run the BACKUP_TOOLS script.
--\/-- RMAN> RUN {EXECUTE SCRIPT backup_tools;}
pause
pause
-- 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;
--\/-- }
pause
pause
CLEAR SCR
-- Delete the BACKUP_TOOLS script.
--\/-- RMAN> DELETE SCRIPT backup_tools;
pause
pause
-- Exit the RMAN.
--\/-- RMAN> exit;
pause
pause
CLEAR SCR
-- Now, you should practice this Hands-On exercise.
-- For more information about the subject, you are encouraged
-- to read from a wide selection of available books.
-- Good luck.
--
pause
pause
|