Create a Batch Script for Oracle RMAN Backup with Logging
You may want to run Oracle Backups using the regular Windows Task Scheduler. A simple batch file can be created for this purpose using below command. If you have multiple databases it would be wise to specify the ORACLE_SID
set ORACLE_SID=<targetdb> rman target / catalog rmanuser/password@catalogdatabase script=<rman_script_name>
Example: Target Database: orcl | Recovery Catalog Username /Password: rman/pwdrman | Recovery Catalog DB: rmandb
set ORACLE_SID=orcl rman target / catalog rman/password@rmandb script=LEVEL1_BACKUP
To enable logging for your entire backup session, you can explicitly define it in the batch file itself, as illustrated below. The APPEND keyword ensures the file in rewritten in the next backup schedule.
rman target / catalog rman/password@rmandb log c:\TEMP\Oracle_backup.log APPEND script=LEVEL1_BACKUP
Posted on February 20, 2014, in Oracle and tagged oracle backup batch file, oracle database backup, oracle rman backup, rman backup batch file, rman backup batch script. Bookmark the permalink. Leave a comment.