../E10643-07.epub /> ../E10643-07.mobi />
@@ is contained in a command file, then
filename directs RMAN to look for the specified file name in the same directory as the command file from which it was called. If not used within a command file, the
@@ command is identical to the
@ (at sign) command.
The command file is local to the RMAN client. The name resolution of the file is dependent on the operating system. For example,
@tmp/cmd1.rman in UNIX or Windows means that
tmp is a subdirectory of the current directory and that the file
cmd1.rman is in this subdirectory.
To illustrate the differences between the
@@ commands, assume that you invoke RMAN as follows:
% rman TARGET / RMAN> @/tmp/cmd1.rman
Assume that the command
@@cmd2.rman appears inside the
cmd1.rman script. In this case, the
@@ command directs RMAN to search for the file
cmd2.rman in the directory
As with the
@ command, you can specify substitution variables in a command file and then pass values to the command file during execution of
@@ (see Example 2-4).
||Specifies the name of a command file, for example,
The following operating system commands create command files
% echo "BACKUP ARCHIVELOG ALL;" > /tmp/bkup_logs.rman % echo "BACKUP TAG &1 DATABASE;" > /tmp/bkup_db.rman % echo "@@bkup_logs.rman" >> /tmp/bkup_db.rman
The following example starts RMAN from the command line and connects to the target database with operating system authentication. The
@ command executes
bkup_db.rman, which contains the command
@@ command specifies that RMAN should look for the
bkup_logs.rman script in the same directory in which
bkup_db.rman is located. The example uses a substitution variable to specify the tag
WHOLE_DB for the database backup.
% rman TARGET / RMAN> @/tmp/bkup_db.rman whole_db