Catalog creation for rman in simple steps…
Red: target Green: catalog Brown: Query or command
- Start the target and client databases.
- Start listener in target
- Once ping the listener with catalog database.
- Create a password file in ORACLE_HOME/dbs like this
$cd $ORACLE_HOME/dbs
$orapwd file=orapwsid password=admin force=y - Create tablespace in catalog database.
sql> create tablespace rmant datafile ‘/ora1/sandy/datafile/rmant01.dbf’ size 20m autoextend on; - Create user rmanu with default tablespace rmant.
sql> create user rmanu identified by rmanu default tablespace rmant; - Grant permissions of the following privileges
sql>grant connect, resource, recovery_catalog_owner to rmanu; - Connect to catalog database from operating system
$rman catalog rmanu/rmanu@catalog
You will connect to rman utility.
Now, create the catalog like this
Rman>create catalog; - Create catalog command creates 90 tables. Once check them.
Rman>exit
$sqlplus rmanu/rmanu
sql>select * from tab;
You can find 90 tables. - Now, connect to target database using catalog.
$rman catalog rmanu/rmanu target sys/admin@tnsname
tnsname = It is tnsname given in the file tnsnames.ora - Now, you will be entering into rman prompt.
There you have to register database.
Rman>Register database;
Now, u can use rman for your backups, restores, recoveries.
Commands you can use in RMAN:
BACKUP: Back up database files, archive logs, backups, or copies.
CHANGE: Update the status of a backup in the RMAN repository.
CONFIGURE: Persistent RMAN settings.
CONNECT: Connect to a recovery catalog or auxiliary database
CROSSCHECK: Check whether backup items still exist.
DELETE: Delete backups from disk or tape
EXIT: Exit the RMAN console
LIST: List backups and copies
RECOVER: Apply redo logs or incremental backups to a restored backup set (or copy) in order to update it to a specified time.
REPORT: Report backup status: database, files, backups
RESTORE: Restore files from an RMAN backup (or copy)
RUN: Some RMAN commands are only valid inside a RUN block.
SET: Settings for the current RMAN session.
SHOW: Display the current configuration
SHUTDOWN: Shutdown the database
SQL: Execute a PL/SQL procedure or SQL statement(not SELECT)
STARTUP: Startup the database
ADVISE FAILURE: Display repair options (11g Data Recovery Advisor)
REPAIR FAILURE: Repair database failures (11g Data Recovery Advisor)