Thursday, January 24, 2008

RMAN loging/tracing and RMAN schema version

1. You can save RMAN backup info into a file after connecting to the target. For example:

spool log to rman_output.log
set echo on;
list backup of database summary;
list backup of archivelog all;
list backup of controlfile;
list incarnation;
list copy of database;
crosscheck backup;
crosscheck copy;
show all;
report obsolete;
report need backup;
restore database preview;
other RMAN commands that generate errors;
spool log off

Before running the RMAN commands above, issue the following OS command to set the NLS_DATE_FORMAT:
set NLS_DATE_FORMAT=DD-MON-RRRR HH24:MI:SS

2. If you put RMAN commands in a OS script, you can enable RMAN loging and tracing by specifying file names on the RMAN start line:

rman catalog rman/rman@catdb target sys/pwd@db log=rman.log trace=rman.trc debug

3. To determine schema version of recovery catalog, connect to catalog database by the recover catalog user and then query RCVER table.

$ sqlplus rman/rman@catdb

SQL > SELECT * FROM rcver;

VERSION
------------
11.01.00

If the table displays multiple rows, then the highest version in the RCVER table is the current catalog schema version. The table stores only the major version numbers and not the patch numbers. For example, assume that the rcver table displays the following rows:

VERSION
------------
08.01.07
09.02.00
10.02.00

No comments: