Databases Reference
In-Depth Information
5> format 'c:\backup\rman_%U.rman';
6> backup
7> database
8> include current controlfile;
9> release channel c1;
10> }
created script full_disk_db
How It Works
Comments help describe the scripts more clearly than just the names you give them. The comments appear when you
display or list the scripts, which amounts to a sort of metadata of the scripts.
There is no way to add a comment to an existing script. Instead, you will need to re-create the script using the
replace command, as shown here:
RMAN> replace script full_disk_db
2> comment 'New Full Backup as Backupset to Disk'
3> {
... and so on ...
Displaying Stored Scripts
Problem
You want to display the code of a script stored in the catalog database.
Solution
The print script command displays the code of the script, as shown here:
RMAN> print script full_disk_db;
The output, in this case, comes back as follows:
printing stored script: full_disk_db
{allocate channel c1 type disk
format 'c:\backup\rman_%U.rman';
backup
database
include current controlfile;
release channel c1;
}
If there are two scripts of the same name—one local and the other global—then the print script command
shown earlier displays the local script, not the global one. If you want to display the global script, use the global
keyword before the word script , as shown here:
RMAN> print global script full_disk_db;
 
Search WWH ::




Custom Search