zoukankan      html  css  js  c++  java
  • OCP-1Z0-053-V12.02-295题

    295.Which statement about using RMAN stored scripts is true?

    A. To create and execute an RMAN stored script, you must use a recovery catalog.

    B. When executing a stored script and a command fails, the remainder of the script is executed, and a

    message is written to the alert log file.

    C. RMAN stored scripts can always be executed against any target database that is registered in the

    recovery catalog.

    D. When you execute a stored script, it always executes using the persistent channel settings previously

    set with the CONFIGURE command.

    Answer: A
    答案解析:
    如果要使用RMAN 存储脚本,就必须使用恢复目录。--A正确。
    如果脚本中的某一RMAN 命令失败,则不会执行脚本中的后续RMAN 命令。--B错。
    A global stored script can be run against any database registered in the recovery catalog--C错,没有指明是否是 global stored script还是 local scrip。
    执行脚本时,脚本将使用当时配置的自动通道。如果需要替换已配置的通道,请在脚本中使用ALLOCATE CHANNEL命令--D错误。

    Managing Stored Scripts

    As explained in "About Stored Scripts", you can store scripts in the recovery catalog. This section explains how to create and manage stored scripts.

    About Stored Scripts

    You can use a stored script as an alternative to a command file for managing frequently used sequences of RMAN commands. The script is stored in the recovery catalog rather than on the file system.

    Stored scripts can be local or global. A local script is associated with the target database to which RMAN is connected when the script is created, and can only be executed when you are connected to that target database. A global stored script can be run against any database registered in the recovery catalog, if the RMAN client is connected to the recovery catalog and a target database.

    The commands allowable within the brackets of the CREATE SCRIPT command are the same commands supported within a RUN block. Any command that is legal within a RUN command is permitted in the stored script. The following commands are not legal within stored scripts: RUN@, and @@.

    When specifying a script name, RMAN permits but generally does not require that you use quotes around the name of a stored script. If the name begins with a digit or is an RMAN reserved word, however, then you must put quotes around the name to use it as a stored script name. Consider avoiding stored script names that begin with nonalphabetic characters or that are the same as RMAN reserved words.

    Consider using a naming convention to avoid confusion between global and local stored scripts. For the EXECUTE SCRIPTDELETE SCRIPT and PRINT SCRIPTcommands, if the script name passed as an argument is not the name of a script defined for the connected target instance, then RMAN looks for a global script by the same name. For example, if the global script global_backup is in the recovery catalog, but no local stored script global_backup is defined for the target database, then the following command deletes the global script:

    DELETE SCRIPT global_backup;

    To use commands related to stored scripts, even global scripts, you must be connected to both a recovery catalog and a target database instance.


     

    存储脚本与命令文件不同,命令文件只可在存储它们的系统中使用,存储脚本始终可供连接到目标数据库和恢复目录的任何RMAN 客户机使用。
    存储脚本可以定义为全局存储脚本或本地存储脚本。本地存储脚本与创建脚本时RMAN 连接到的目标数据库相关联,只有连接到该目标数据库时才能执行本地存储脚本。全局存储脚本则可针对在恢复目录中注册的任何数据库执行,前提是RMAN 客户机连接到恢复目录和某一目标数据库。

    如果要使用RMAN 存储脚本,就必须使用恢复目录。创建RMAN 存储脚本时:连接到所需的目标数据库和恢复目录,然后执行CREATE SCRIPT命令即可创建存储脚本。

    连接到目标数据库和恢复目录,然后使用EXECUTE SCRIPT命令即可执行存储脚本。请注意,EXECUTE SCRIPT命令需要RUN块。如果脚本中的某一RMAN 命令失败,则不会执行脚本中的后续RMAN 命令。

    执行脚本时,脚本将使用当时配置的自动通道。如果需要替换已配置的通道,请在脚本中使用ALLOCATE CHANNEL命令


  • 相关阅读:
    SSH 免密登录配置
    Hadoop 2.7.2 集群安装配置
    将oracle数据库中数据写入excel文件
    PLSQL提交请求集
    oracle会计工作总结,EBS 创建会计科目 小结
    将oracle数据库中数据写入excel文件
    如何成为一名优秀的工程师(听讲座有感) Winema
    基于W5300的嵌入式以太网接口设计 Winema
    Java 基础入门随笔(2) JavaSE版——关键字、进制转换、类型转换
    VMware 11安装Mac OS X 10.10 及安装Mac Vmware Tools.
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316719.html
Copyright © 2011-2022 走看看