307.You have created a script in the recovery catalog called backup_database. Which of the following
commands would successfully execute that script?
A. run { open script backup_database; run script backup_database }
B. run { engage script backup_database; }
C. run { run script backup_database; }
D. Run { execute script backup_database; }
E. The name backup_database is an invalid name for an RMAN script. Trying to run it from RMAN would
result in an error.
Answer: D
创建与调用RMAN脚本(前提:必须使用catalog)
RMAN> CREATE SCRIPT backup_whole
2> COMMENT "backup whole database and archived redo logs"
3> {
4> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
5> }
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of create script command on default channel at 03/25/2016 11:03:51
RMAN-20401: script already exists
RMAN> drop script backup_whole;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "script": expecting one of: "catalog, database, restore"
RMAN-01007: at line 1 column 6 file: standard input
RMAN> run{
2> execute script backup_whole;
3> }
executing script: backup_whole
Starting backup at 25-MAR-16
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=16 device type=DISK
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8520577/viewspace-2072474/
,如需转载,请注明出处,否则将追究法律责任。