668.Examine the following RMAN script:
RMAN> run {
debug on;
allocate channel c1 type disk;
backup datafile 5;
}
Which statement describes the purpose of the script?
A. The data file is checked for physical corruption and backed up if found clean.
B. The backup of data file 5 is performed and the interactive messages during the backup are
suppressed.
C. The existing backup for the data file is checked and the backup is performed if there are changes in the
data file after the last backup.
D. The backup of data file 5 is performed and all SQL statements that are executed during RMAN
compilation and their results are displayed
Answer: D
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/12510975
DEBUG选项用于:
– 查看生成的PL/SQL
– 准确判断RMAN 命令在何处挂起或出错
• DEBUG选项是在RMAN 提示符下或者在run 块内指定的。
• DEBUG选项会创建大量输出,因此要将输出重定向到跟踪文件:
$ rman target / catalog rman/rman debug trace trace.log
DEBUG选项显示在RMAN 编译期间执行的全部SQL 语句以及执行结果。另外,还显示恢复目录PL/SQL 程序包生成的所有信息。以下示例中,在备份数据文件3 期间会写入DEBUG输出,但是在备份数据文件4 期间则不会:
RMAN> run {
debug on;
allocate channel c1 type disk;
backup datafile 3;
debug off;
backup datafile 4; }
记住,DEBUG输出可能非常大,所以请确保有足够的磁盘空间可供跟踪文件使用。
这个示例备份会话中没有生成任何错误,只创建了一个大约0.5 兆字节大小的跟踪文件:
$ rman target / catalog rman/rman debug trace sample.log
RMAN> backup database;
RMAN> host "ls –l sample.log";
-rw-r--r-- 1 user02 dba 576270 Apr 6 10:38 sample.log
host command complete