Specifying the Location of RMAN Output -- RMAN的日志输出
By default, RMAN writes command output to standard output. To redirect output to a
log file, enter the LOG parameter on the command line when starting RMAN, as in the
following example:
% rman LOG /tmp/rman.log -- 将RMAN的输出写进日志
In this case, RMAN displays command input but does not display the RMAN output.
The easiest way to send RMAN output both to a log file and to standard output is to
use the Linux tee command or its equivalent. For example, the following technique
enables both input and output to be visible in the RMAN command-line interface:
% rman | tee rman.log -- 输入输出写进日志的同时也输出到终端上
Checking RMAN Syntax -- 在操作之前,先检查RMAN的语法
To check RMAN syntax at the command line:
1. Start RMAN with the CHECKSYNTAX parameter.
For example, enter the following commands:
% rman CHECKSYNTAX
2. Enter the RMAN commands to be tested.
The following shows a sample interactive session, with user-entered text in bold.
RMAN> run [ backup database; ] -- 应该是“{ } ”,它只是检查,并不真的执行
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signaled during parse