Skip Headers
Oracle® Database Backup and Recovery Reference
11g Release 2 (11.2)

Part Number E10643-06
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
RCMRF100

@ (at sign)

Purpose

Use the @ command to execute a series of RMAN commands stored in an operating system file with the specified path name.

Note:

The file must contain complete RMAN commands. Partial commands generate syntax errors.

Prerequisites

The command file must contain complete RMAN commands.

If you use the @ command within a RUN command, then the @ command must be on its own line (see Example 2-2).

Usage Notes

RMAN processes the file as if its contents had appeared in place of the @ command. As shown in Example 2-3, you can specify substitution variables in a command file and then pass values to the command file during execution.

See Also:

RMAN to learn more about using substitution variables in RMAN

Syntax

RCMRF89978@::=

Description of at.gif follows
Description of the illustration at.gif

Semantics

Syntax Element Description
filename Specifies the name of a command file, for example, @/oracle/dbs/cmd/cmd1.rman. If you do not specify the absolute path name, then the current working directory is assumed, for example, @cmd1.rman.

Any file extension (or no file extension) is valid. Do not use quotes around the string or leave whitespace between the @ keyword and the file name.


Examples

RCMRF89979Example 2-1 Running a Command File from the Operating System Command Line

This example creates an RMAN command file and then executes it from the operating system command line.

% echo "BACKUP DATABASE;" > backup_db.rman
% rman TARGET / @backup_db.rman

RCMRF89980Example 2-2 Running a Command File Within RMAN

This example shows how you can execute a command file from the RMAN prompt and from within a RUN command. User-entered text appears in bold.

RMAN> @backup_db.rman
RMAN> RUN {
2> @backup_db.rman
3> backup database;
4> **end-of-file**
5> }

RCMRF89981Example 2-3 Specifying Substitution Variables

Suppose that you use a text editor to create command file whole_db.rman with the following contents:

# name: whole_db.rman
BACKUP TAG &1 COPIES &2 DATABASE;
EXIT;

The following example starts RMAN from the operating system prompt and connects to the target database. The example then runs the @ command, passing variables to the command file to create two database backups with tag Q106:

% rman TARGET /
RMAN> @/tmp/whole_db.rman Q106 2
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF