0% found this document useful (0 votes)
153 views17 pages

Creating The Recovery Catalog Schema in The Recovery Catalog Database

The document discusses creating and configuring an RMAN recovery catalog. It describes steps to create a user and schema for the catalog, grant privileges to the schema owner, connect and create the catalog, register target databases, and optionally catalog existing backups. The recovery catalog tracks RMAN backups and is used to manage recovery of Oracle databases.

Uploaded by

api-19920581
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views17 pages

Creating The Recovery Catalog Schema in The Recovery Catalog Database

The document discusses creating and configuring an RMAN recovery catalog. It describes steps to create a user and schema for the catalog, grant privileges to the schema owner, connect and create the catalog, register target databases, and optionally catalog existing backups. The recovery catalog tracks RMAN backups and is used to manage recovery of Oracle databases.

Uploaded by

api-19920581
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Creating the recovery

catalog schema in the


recovery catalog database

1-RMAN Recovery Catalog


Start SQL*Plus and then connect with
administrator privileges to the database
containing the recovery catalog. For
example, enter:

CONNECT SYS/oracle@rcatdb AS SYSDBA

2-RMAN Recovery Catalog


Create a user and schema for the
recovery catalog. For example, enter

CREATE USER rman IDENTIFIED BY cat


TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE tools
QUOTA UNLIMITED ON tools;

3-RMAN Recovery Catalog


Grant the RECOVERY_CATALOG_OWNER
role to the schema owner. This role
provides the user with privileges to
maintain and query the recovery
catalog.
GRANT RECOVERY_CATALOG_OWNER TO rman;

4-RMAN Recovery Catalog


Grant other desired privileges to the
RMAN user.

GRANT CONNECT, RESOURCE TO rman;

5-RMAN Recovery Catalog


Creating Recovery Catalog

After creating the catalog owner, create


the catalog itself with the RMAN
CREATE CATALOG command.

The command creates the catalog in the


default tablespace of the catalog owner.

6-RMAN Recovery Catalog


To create the recovery catalog:
rman CATALOG rman/cat@rcatdb

7-RMAN Recovery Catalog


You can also connect from the RMAN
prompt
RMAN> CONNECT CATALOG rman/cat@rcatdb

8-RMAN Recovery Catalog


Run the CREATE CATALOG command to
create the catalog. If the catalog
Tablespace is this user's default
tblespace, then you can run this
command:

CREATE CATALOG;

9-RMAN Recovery Catalog


Note that the creation of the catalog can
take several minutes.

Optionally, start SQL*Plus and query the


recovery catalog to see which tables
were created:

SQL> SELECT TABLE_NAME FROM


USER_TABLES;

10-RMAN Recovery Catalog


To register the target database

Connect to the target database and


recovery catalog database. For example,
issue the following to connect to the
catalog database catdb as user rman
(who owns the catalog schema)

% rman TARGET sys/sys123@dbap1


CATALOG rman/cat@rcatdb

11-RMAN Recovery Catalog


If the target database is not mounted,
then mount or open it. For example,
issue:

STARTUP MOUNT;

12-RMAN Recovery Catalog


The recovery catalog database must be
open.

To use RMAN with a target database,


you must first register the database.
Run the following command:

REGISTER DATABASE;

13-RMAN Recovery Catalog


Test that the registration was successful
by running REPORT SCHEMA. This
command shows the database structure
as it is stored in the repository. For
example:

RMAN> REPORT SCHEMA;

14-RMAN Recovery Catalog


Report of database schema

File K-bytes Tablespace RB segs Datafile Name


---- ---------- -------------------- ------- -------------------
1 307200 SYSTEM *** /oracle/oradata/trgt/system01.dbf
2 20480 UNDOTBS *** /oracle/oradata/trgt/undotbs01.dbf
3 10240 CWMLITE *** /oracle/oradata/trgt/cwmlite01.dbf
4 10240 DRSYS *** /oracle/oradata/trgt/drsys01.dbf
5 10240 EXAMPLE *** /oracle/oradata/trgt/example01.dbf
6 10240 INDX *** /oracle/oradata/trgt/indx01.dbf
7 10240 TOOLS *** /oracle/oradata/trgt/tools01.dbf
8 10240 USERS *** /oracle/oradata/trgt/users01.dbf

15-RMAN Recovery Catalog


Existing user-created backups can
be added to the catalog using:

RMAN> catalog datafilecopy


‘C:\Oracle\Oradata\TSH1.dbf’;

RMAN> catalog archivelog ‘log1’,


'log2', 'log3', ... 'logN';

16-RMAN Recovery Catalog


RMAN> configure channel device type disk
format 'C:\Rman_bkup\Backup%d_DB_%u_%s_%p';

%d-SID
%u- 8 character backupset and time
%p- Piece number
%c- copy number
%s- Sequence number

17-RMAN Recovery Catalog

You might also like