RMAN CATALOG CREATION AND BACKUP SETUP

Step 1. Create a new database CATALOG_RMAN on same machine or another machine than Production Database (PROD_RMAN)
Step 2. Launch command prompt and do these activities
C:\Documents and Settings\Administrator>sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 10 12:48:14 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> drop tablespace rman including contents and datafiles;
Tablespace dropped.
SQL> create tablespace rman datafile 'c:\oracle\product\10.2.0\oradata\CATALOG_RMAN\rman.dbf' size 1000M autoextend on;
Tablespace created.
SQL> create user rman identified by rman default tablespace rman temporary tablespace temp;
User created.
SQL> grant connect, resource, recovery_catalog_owner to rman;
Grant succeeded.
Step 3. Launch another command window and do these activities
C:\Documents and Settings\Administrator>rman catalog rman/rman
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Sep 10 12:57:58 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to recovery catalog database
RMAN> create catalog
recovery catalog created

Step 4. Switch to first window then run these commands to check
SQL> conn rman
Enter password:
Connected.
SQL> select * from tab;
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_BACKUP_FILES                VIEW
RC_RMAN_BACKUP_SUBJOB_DETAILS  VIEW
RC_RMAN_BACKUP_JOB_DETAILS     VIEW
RC_BACKUP_SET_DETAILS          VIEW
RC_BACKUP_PIECE_DETAILS        VIEW
RC_BACKUP_COPY_DETAILS         VIEW
RC_PROXY_COPY_DETAILS          VIEW
RC_PROXY_ARCHIVELOG_DETAILS    VIEW
RC_BACKUP_DATAFILE_DETAILS     VIEW
RC_BACKUP_CONTROLFILE_DETAILS  VIEW
RC_BACKUP_ARCHIVELOG_DETAILS   VIEW
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_BACKUP_SPFILE_DETAILS       VIEW
RC_BACKUP_SET_SUMMARY          VIEW
RC_BACKUP_DATAFILE_SUMMARY     VIEW
RC_BACKUP_CONTROLFILE_SUMMARY  VIEW
RC_BACKUP_ARCHIVELOG_SUMMARY   VIEW
RC_BACKUP_SPFILE_SUMMARY       VIEW
RC_BACKUP_COPY_SUMMARY         VIEW
RC_PROXY_COPY_SUMMARY          VIEW
RC_PROXY_ARCHIVELOG_SUMMARY    VIEW
RC_UNUSABLE_BACKUPFILE_DETAILS VIEW
RC_RMAN_BACKUP_TYPE            VIEW
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
CDF                            TABLE
XDF                            TABLE
BRL                            TABLE
BCB                            TABLE
CCB                            TABLE
SCR                            TABLE
SCRL                           TABLE
CONFIG                         TABLE
XAL                            TABLE
RSR                            TABLE
FB                             TABLE
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_DATABASE                    VIEW
RC_DATABASE_INCARNATION        VIEW
RC_RESYNC                      VIEW
RC_CHECKPOINT                  VIEW
RC_TABLESPACE                  VIEW
RC_DATAFILE                    VIEW
RC_TEMPFILE                    VIEW
RC_REDO_THREAD                 VIEW
RC_REDO_LOG                    VIEW
RC_LOG_HISTORY                 VIEW
RC_ARCHIVED_LOG                VIEW
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_BACKUP_SET                  VIEW
RC_BACKUP_PIECE                VIEW
RC_BACKUP_DATAFILE             VIEW
RC_BACKUP_CONTROLFILE          VIEW
RC_BACKUP_SPFILE               VIEW
RC_DATAFILE_COPY               VIEW
RC_CONTROLFILE_COPY            VIEW
RC_BACKUP_REDOLOG              VIEW
RC_BACKUP_CORRUPTION           VIEW
RC_COPY_CORRUPTION             VIEW
RC_OFFLINE_RANGE               VIEW
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
RC_STORED_SCRIPT               VIEW
RC_STORED_SCRIPT_LINE          VIEW
RC_PROXY_DATAFILE              VIEW
RC_PROXY_CONTROLFILE           VIEW
RC_RMAN_CONFIGURATION          VIEW
RC_DATABASE_BLOCK_CORRUPTION   VIEW
RC_PROXY_ARCHIVEDLOG           VIEW
RC_RMAN_STATUS                 VIEW
ROUT                           TABLE
RC_RMAN_OUTPUT                 VIEW
RCVER                          TABLE
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
DB                             TABLE
NODE                           TABLE
CONF                           TABLE
DBINC                          TABLE
CKP                            TABLE
TS                             TABLE
TSATT                          TABLE
DF                             TABLE
DFATT                          TABLE
TF                             TABLE
TFATT                          TABLE
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
OFFR                           TABLE
RR                             TABLE
RT                             TABLE
ORL                            TABLE
RLH                            TABLE
AL                             TABLE
BS                             TABLE
BP                             TABLE
BCF                            TABLE
CCF                            TABLE
XCF                            TABLE
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
BSF                            TABLE
BDF                            TABLE
90 rows selected.
SQL> select * from rc_database;
no rows selected

Step 5. Now go to Production Server and do these activities
C:\Documents and Settings\Administrator>rman catalog rman/rman@CATALOG_RMAN target
sys/syspass@PROD_RMAN
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Sep 10 16:59:31 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: PROD_RMAN (DBID=2921436569)
connected to recovery catalog database
RMAN> register database

Step 6. Now go to Another system/database prepared for rman catalog and verify

SQL> select * from rc_database;
    DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS
---------- ---------- ---------- -------- ----------------- ---------
         1          2 2921436569 PROD_RMAN            534907 10-SEP-12
SQL> select * from rc_backup_set;
no rows selected

Step 7. Again switch to Production Server and run these commands to take backup
C:\Documents and Settings\Administrator>rman catalog rman/rman@CATALOG_RMAN target
sys/syspass@PROD_RMAN
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Sep 10 17:05:11 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: PROD_RMAN (DBID=2921436569)
connected to recovery catalog database
RMAN> configure channel device type disk format 'e:\backup\ora10g_%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'e:\backup\ora10g_%U';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> backup database;

Starting backup at 10-SEP-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=151 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/10/2012 17:06:
11
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 10-SEP-12
channel ORA_DISK_1: finished piece 1 at 10-SEP-12
piece handle=E:\BACKUP\ORA10G_02NKS4G3_1_1 tag=TAG20120910T170610 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/10/2012 17:06:
11
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

Step 8. Now launch another command window on production serverand close database
SQL> conn sys@PROD_RMAN as sysdba
Enter password:
Connected.
SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            C:\oracle10g\product\10.2.0\db_1\RDBMS
Oldest online log sequence     0
Current log sequence           1
SQL> alter database close;
Database altered.

Step 9. Now again switch to firts window of Production database and take backup
C:\Documents and Settings\Administrator>rman catalog rman/rman@CATALOG_RMAN target
sys/syspass@PROD_RMAN
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Sep 10 17:14:19 2012
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
connected to target database: PROD_MAN (DBID=2921436569, not open)
connected to recovery catalog database
RMAN> configure channel device type disk format 'e:\backup\ora10g_%U';
old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'e:\backup\ora10g_%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   'e:\backup\ora10g_%U';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> backup database;
Starting backup at 10-SEP-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=151 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=E:\ORACLE\ORADATA\TESTRMAN\SYSTEM01.DBF
input datafile fno=00003 name=E:\ORACLE\ORADATA\TESTRMAN\SYSAUX01.DBF
input datafile fno=00002 name=E:\ORACLE\ORADATA\TESTRMAN\UNDOTBS01.DBF
input datafile fno=00004 name=E:\ORACLE\ORADATA\TESTRMAN\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 10-SEP-12
channel ORA_DISK_1: finished piece 1 at 10-SEP-12
piece handle=E:\BACKUP\ORA10G_03NKS506_1_1 tag=TAG20120910T171446 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:36
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 10-SEP-12
channel ORA_DISK_1: finished piece 1 at 10-SEP-12
piece handle=E:\BACKUP\ORA10G_04NKS51A_1_1 tag=TAG20120910T171446 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 10-SEP-12

Step 10. At last switch to another catalog database window and verify the backup
SQL> select * from rc_backup_set;
    DB_KEY      DB_ID     BS_KEY      RECID      STAMP  SET_STAMP  SET_COUNT B
---------- ---------- ---------- ---------- ---------- ---------- ---------- -
INCREMENTAL_LEVEL     PIECES START_TIM COMPLETIO ELAPSED_SECONDS S CONTROL INP
----------------- ---------- --------- --------- --------------- - ------- ---
KEE KEEP_UNTI KEEP_OPTIO
--- --------- ----------
         1 2921436569         17          1  793645573  793645571          2 D
                           1 10-SEP-12 10-SEP-12               2 A BACKUP  NO

Comments