Monday, January 5, 2009

Printing RMAN stored scripts names.

I just wanted to check rman catalog's stored scripts names, so here are my findings:

For 9i:

In 9i you have to use sqlplus to connect with rman catalog and fetch stored scripts name. e.g.

step 1: $sqlplus rman-user/rman-user-password@Catalog-SID

Step 2: sql> select distinct script_name from rc_stored_script;

For 10g:

In 10g you can even query stored scripts name from RMAN prompt. e.g.

LIST SCRIPT NAMES;

If RMAN is not connected to a target database when the LIST SCRIPT NAMES command is run, then RMAN will respond with an error.

To view only global script names, use this form of the command:

LIST GLOBAL SCRIPT NAMES;

To view the names of all scripts stored in the current recovery catalog, including global scripts and local scripts for all target databases registered in the recovery catalog, use this form of the command:

LIST ALL SCRIPT NAMES;

The output will indicate for each script listed which target database the script is defined for (or whether a script is global).


cheers

No comments: