Configuration of the RMAN tool
Introduction
You, as a DBA,
are responsible for configuring the RMAN
repository, performing an image copy,
connecting to the target and catalog
databases, etc. Your job�s responsibilities
dictate that you should be at least informed
of the following basic fundamental subjects:
Configuring
the RMAN retention policy
Excluding any
tablespaces from a backup
Performing an
image copy
Using the
CONNECT CATALOG
Using the
CONNECT TARGET
Performing an
image copy of the data file
Using the
NOCHECKSUM parameter
Performing an
image copy of the current control file
Using a
specific backup naming format
Commands:
COPY DATAFILE
TO �xxx� NOCHECKSUM;
HOST MKDIR
DOS> RMAN
RMAN> CONNECT
CATALOG
RMAN> CONNECT
TARGET
RMAN>
CONFIGURE RETENTION POLICY
RMAN>
CONFIGURE EXCLUDE FOR TABLESPACE
RMAN> COPY
DATAFILE
RMAN> COPY
CURRENT CONTROLFILE
RMAN> exit
Hands-on
In this
exercise you will learn how to connect to
RMAN tool with TARGET and CATALOG options,
configure the retention policy, exclude any
tablespaces from a backup, perform an image
copy, and more.
Create a
folder
Now, let's first create a directory called
RMANBKUP and backup all of the database
files, and Controlfiles into that directory.
SQL> HOST MKDIR c:
The RMANBKUP folder should be
successfully created.
Execute RMAN
tool
Now, run the RMAN tool.
DOS> RMAN
Connect to RMAN (catalog database)
Connect to the
RMAN tool by login to the Recovery Catalog
database.
RMAN> CONNECT
CATALOG RMAN/password@dbs4RMAN
Connect to a target database
Connect to the
SCHOOL target database.
RMAN> CONNECT
TARGET system/manager@yourhost
Create a
retention policy
Configure the retention
policy to have at most, 2 redundant objects.
RMAN> CONFIGURE RETENTION POLICY TO
REDUNDANCY 2;
Disable a retention policy
Disable the
retention policy.
RMAN> CONFIGURE
RETENTION POLICY TO NONE;
Exclude a tablespace from backup
Exclude the
TOOLS tablespace from any future whole
backup database sets.
RMAN> CONFIGURE
EXCLUDE FOR TABLESPACE tools;
Create an image copy for datafile
Perform an
image copy of the data file 7 and use the
NOCHECKSUM parameter.
RMAN> COPY
DATAFILE 7
TO 'c:_yymmdd.dbf'
NOCHECKSUM;
Create an
image copy for controlfile
Perform an image copy of the current control
file in a specific directory with a specific
user naming format.
RMAN> COPY
CURRENT CONTROLFILE
TO 'c:_yyyymmdd.ctl';
Then exit from
RMAN.
RMAN> exit
Questions:
Q: How do you
configure a RMAN retention policy?
Q: How do you
exclude a tablespace from a daily backup?
Q: How do you
perform an image copy of a datafile?
Q: Describe
the NOCHECKSUM parameter.
Q: How do you
perform an image copy of your current
controlfile?
Q: What do the
following RMAN commands do?
DOS> RMAN
RMAN> CONNECT
CATALOG RMAN/password@dbs4RMAN
RMAN> CONNECT
TARGET system/manager@yourhost
RMAN>
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
RMAN>
CONFIGURE RETENTION POLICY TO NONE;
RMAN>
CONFIGURE EXCLUDE FOR TABLESPACE tools;
RMAN> COPY DATAFILE 7
TO 'c:_yymmdd.dbf'
NOCHECKSUM;
RMAN> COPY CURRENT CONTROLFILE
TO 'c:_yyyymmdd.ctl';
RMAN> exit |