@ REM $ header: cold_database_backup.cmd, v 1.1 13:52:48 $
@ REM The following is a change made to Oracle 10.2. Note the target_tns value, which must be left blank. Modify the red part. For the complete code, see C: \ Program Files \ Veritas \ NetBackup \ dbext \ oracle \ samples \ RMAN \ cold_database_backup.cmd
@ REM bcpyrght
@ REM ************************************** *************************************
@ REM * $ vrtscprght: Copyright 1993-2005 Veritas Software Corporation, All Rights Reserved $ *
@ REM ************************************** *************************************
@ REM ecpyrght
@ REM ---------------------------------------------------------------------------
@ REM cold_database_backup.cmd
@ REM ---------------------------------------------------------------------------
@ REM this script uses recovery manager to take a cold (Consistent) Database
@ REM backup. A cold backup is one where the database is shutdown cleanly before
@ REM Deming the backup.
@ REM ---------------------------------------------------------------------------
@ Setlocal enableextensions
@ REM ---------------------------------------------------------------------------
@ REM no need to echo the commands.
@ REM ---------------------------------------------------------------------------
@ Echo off
@ REM ---------------------------------------------------------------------------
@ REM put output in the same filename, different extension.
@ REM ---------------------------------------------------------------------------
@ Set rman_log_file = "% ~ Dpn0.out"
@ REM ---------------------------------------------------------------------------
@ REM you may want to delete the previous output file so that backup information
@ REM does not accumulate. If not, delete the following command.
@ REM ---------------------------------------------------------------------------
@ If exist % rman_log_file % del % rman_log_file %
@ REM ---------------------------------------------------------------------------
@ REM log the start of this script.
@ REM ---------------------------------------------------------------------------
@ For/F "tokens = 1 *" % P in ('date/t') Do @ set date = % P % Q
@ For/F % P in ('time/t') Do @ set date = % date % P
@ Echo === started on % date % ==>>% rman_log_file %
@ Echo Script Name: % 0 >>% rman_log_file %
@ REM ---------------------------------------------------------------------------
@ REM replace H: \ oracle \ ora81, below, with the Oracle Home path.
@ REM ---------------------------------------------------------------------------
@ Set ORACLE_HOME = D: \ oracle
@ REM ---------------------------------------------------------------------------
@ REM replace ora81, below, with the Oracle SID of the target database.
@ REM ---------------------------------------------------------------------------
@ Set oracle_sid = orcl
@ REM ---------------------------------------------------------------------------
@ REM several RMAN commands use time parameters that require nls_lang and
@ REM nls_date_format to be set. This example uses the standard date format.
@ REM replace below with the desired language values.
@ REM ---------------------------------------------------------------------------
@ Set nls_lang = American
@ Set nls_date_format = YYYY-MM-DD: hh24: MI: SS
@ REM ---------------------------------------------------------------------------
@ REM Replace the following with the fully qualified path name of the init file
@ REM for the target database.
@ REM ---------------------------------------------------------------------------
@ Set target_init_file = D: \ oracle \ database \ initorcl. ora
@ REM ---------------------------------------------------------------------------
@ REM replace productiondb, below, with the target database TNS alias (service)
@ REM if it is executed on the local machine, the value of this parameter is deleted.
@ REM name from the tnsnames. ora file.
@ REM ---------------------------------------------------------------------------
@ Set target_tns =