ITPub博客

首页 > 数据库 > Oracle > Oracle OCP 1Z0-053 Q307(Rman execute global scripts)

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

原创 Oracle 作者:abstractcyj 时间:2016-03-30 16:09:02 0 删除 编辑
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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
曾从事java方向开发多年。近年已经转入数据库方向。主要擅长SQL优化,Oracle数据库问题诊断,Oracle备份与恢复等。服务于医药物流,医院等行业

注册时间:2010-01-26

  • 博文量
    602
  • 访问量
    1091647