Databases Reference
In-Depth Information
Dropping Stored Scripts
Problem
You want to drop a stored script from the catalog database.
Solution
The RMAN command delete script drops the script from the catalog database. Here is how you drop a script
named delete_arc_logs :
RMAN> delete script delete_arc_logs;
deleted script: delete_arc_logs
RMAN>
How It Works
If you want to drop a script with some special name, such as a number at the beginning of the name or a reserved
word, you need to enclose the name in quotes, as shown here:
RMAN> delete script "1stDelete";
If you have two scripts—one local and one global—in the same name, then the delete script command
drops the local one, not the global one. If you want to drop the global script, you must use the keyword global in the
command, as shown here:
RMAN> delete global script delete_arc_logs;
deleted global script: delete_arc_logs
RMAN>
Executing a Global Script When a Local Script of the
Same Name Exists
Problem
You have two scripts of the same name— delete_arc_logs —one local and one global. You want to execute the global
script, not the local one.
Solution
To execute the global script, you call that script with the clause global before it, as shown in the following RMAN
command:
RMAN> run { execute global script delete_arc_logs; }
 
Search WWH ::




Custom Search