Databases Reference
In-Depth Information
has no syntax errors” message from RMAN (if you use a command file instead of an RMAN command, you'll instead
get the message: “The cmdfile has no syntax errors”). Otherwise, RMAN will issue an error message, as shown in the
following example:
[oracle@virtual1 rman]$ rman checksyntax @badcmdfile
RMAN> # file with illegal syntax
2> run (
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "(": expecting one of: "{"
RMAN-01007: at line 2 column 5 file: badcmdfile
[oracle@virtual1 rman]$
The output of the checksyntax command in this example reveals there is a syntax error in your run block. The
checksyntax command is handy for checking scripts for syntax errors. With RMAN, there's no need for a script to fail
unexpectedly because you mangled the syntax of a command. If you're surprised by an error, it's because you didn't
test with checksyntax first.
Hiding Passwords When Connecting to RMAN
Problem
You want to hide the database passwords when connecting to the RMAN client.
Solution
One of the easiest ways to prevent others from gleaning sensitive database passwords by looking over your shoulder is
simply to never type a password directly at the operating-system level when starting the RMAN client. One approach
is to pass only your username on the command line, letting RMAN prompt for your password:
[oracle@virtual1 ~]$ rman target sys@orcl
Recovery Manager: Release 12.1.0.0.2 - Beta on Tue Jul 24 11:02:18 2012
Copyright (c) 1982, 2012, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: ORCL (DBID=1316762630)
RMAN>
When RMAN prompts you for the target database password, it won't echo the characters you type to the terminal,
and thus your password is safe from prying eyes.
If you're using a command file that employs database credentials (username and password), you must ensure
that the connection string doesn't get written to any log files that capture the RMAN output. One good way to prevent
 
Search WWH ::




Custom Search