Oracle OCP 1Z0-053 Q307(Rman execute global scripts)

abstractcyj發表於2016-03-30
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部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2072474/,如需轉載,請註明出處,否則將追究法律責任。

相關文章