Scripting RMAN Operations RMAN supports the use of command files to manage recurring tasks such as weekly

backups. A command file is a client-side text file containing RMAN commands,

exactly as you enter them at the RMAN prompt. You can use any file extension.The

RUN command provides a degree of flow-of-control in your scripts. To create and run a command file: 1.Use a text editor to create a command file. For example, create a command file with the following contents: # my_command_file.txt





2.Start RMAN and then execute the contents of a command file by running the@ command at the RMAN prompt: % rman RMAN> @/my_dir/my_command_file.txt # runs specified command file You can also launch RMAN with a command file to run, as shown here: % rman @/my_dir/my_command_file.txt Reporting on RMAN Operations The RMANLIST andREPORT commands generate reports on backup activities based on the RMAN repository. Use the SHOW ALL command to display the current RMAN configuration. Listing Backups Run the LIST BACKUP and LIST COPY commands to display information about

backups and datafile copies listed in the repository. For backups, you can control the

format ofLIST output with the options in the following tables.

See Also:Chapter 15, "Validating Database Files and Backups" See Also:"Using Command Files with RMAN" on page 4-3 to learn more about command files, and "Using Substitution Variables in Command Files" on page 4-4 to learn how to use substitu

via Oracle® Database Backup and Recovery User’s Guide 11g.