Skip to main content

RMAN - Setup of the Recovery Catalog:



RMAN - Setup of the Recovery Catalog:

Setting up the recovery catalog RMAN is the first task the DBA completes when preparing to use RMAN. Lets look at the basic steps required to set up the recovery catalog.

Creating The Recovery Catalog
Creating the recovery catalog is not a terribly complicated process. It requires the DBA to set up a user in the database that will be used to store the recover catalog schema objects. Then the DBA needs to grant certain user rights to that userid, and then run a script to create the recovery catalog. The example below shows the creation of a user/schema in a database that will store the recovery catalog:

CREATE USER MYRMAN IDENTIFIED BY MYRMAN
DEFAULT TABLESPACE myrman_catalog_tbs
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON myrman_catalog_tbs;

Once the user has been created, follow these steps to complete the setup of the schema and to create the recovery catalog in that schema:

GRANT the userid (in this example, myrman) the role RECOVERY_CATALOG_OWNER with the following:

GRANT CONNECT TO myrman;
GRANT RECOVERY_CATALOG_OWNER TO myrman;

The first grant allows you to connect to the recovery catalog schema, create tables and the like. The second grant gives the user account the privileges that it needs to manage the recovery catalog.

Once you have created the schema for the recovery catalog, sign into that user account. You must execute the SQL script catrman.sql from the account you just created to install the recovery catalog:

@?/rdbms/admin/catrman.sql

This script is generally in the ORACLE_HOME/rdbms/admin directory on Unix or in the ORACLE_HOME\rdbms80\admin directory on NT.



RMAN Basics

The RMAN executable allows you to manage the recovery catalog, start backups and recoveries, and generate reports on backups. Generally, you will start RMAN from the command line, passing it parameters as required. An example call to RMAN might look like this:

  •                         rman target=system/manager@test1
  •                         rcvcat=myrman/myrman@backupdb 

RMAN has several command-line options that you can provide on the command line:


Option  Description
APPEND               This causes RMAN to append to the output file specified by MSGLOG.

CMDFILE              This causes RMAN to get input from the filename given as the argument to this parameter. If it is not specified, the default is STDIN.

DEBUG                This turns on the debug mode for RMAN.

MSGLOG             This specifies the name of a file to which RMAN will send all messages. The default is STDOUT.

NOCATALOG      This option is required if you do not have a recovery catalog. Using this parameter allows you to do backups and recoveries without the recovery catalog.

RCVCAT                This is the connect string to the recovery catalog username and database.


TARGET                This is the target database connect string. If you wish to do the equivalent of connect sys as sysdba, just type "target /" (without the quotation marks).

Comments

Popular posts from this blog

Registering The Database to RMAN catalog database:

Registering The Database to RMAN catalog database: Need to start RMAN as follows: RMAN target=sys/password@database_to_backup rcvcat=sys/password@recovery_catalog_database Another variation on the command, if the recovery catalog and the database were on the same server, might be as shown: oraenv ORACLE_SID = [KKUY] ? KKUY RMAN rcvcat=sys/password@recovery_catalog_database RMAN> connect target Recovery Manager: Release 8.0.5.1.0 - Production RMAN-06005: connected to target database: KKUY RMAN-06008: connected to recovery catalog database Use the below command to register the database. RMAN>register database; Want to verify if a database is registered in the recovery catalog. To do this, connect to RMAN and issue the command LIST INCARNATION OF DATABASE. RMAN> list incarnation of database; RMAN-03022: compiling command: list RMAN-06240: List of Database Incarnations RMAN-06241: DB Key Inc Key DB Name DB ID      CUR Reset SCN   Reset Time RMAN

ORA-39014: One or more workers have prematurely exited.ORA-00018: maximum number of sessions exceeded

ERROR: I was Performing a full database import and during the import I faced the below error. ORA-39014: One or more workers have prematurely exited. ORA-39029: worker 6 with process name "DW07" prematurely terminated ORA-31672: Worker process DW07 died unexpectedly. Job "SYSTEM"."SYS_IMPORT_FULL_04" stopped due to fatal error at 00:59:40 ORA-39014: One or more workers have prematurely exited. SOLUTION:  Run the import with fewer parallel processes, like PARALLEL=2 instead of 8. I was able to run the import successfully. NOTE 1: This errors occurs when there are less session allocation in the database. check the session,process parameters and increase them accordingly. To avoid such errors again. NOTE 2 : Note: Increasing processes parameter increases the amount of shared memory that needs to be reserved & the OS must be configured to support the larger amount of shared memory. So here we first need to increase the Memory & SG