Tuesday, September 20, 2011

Automating RMAN via .bat

If you had automated Oracle RMAN backups via Enterprise Manager Console on a Windows Server and now your console no longer starts, you can create a backup solution running RMAN commands via a .bat script.

I've found the easiest way is to create a command file (cmdfile) and a batch file that calls it. The following is an example of creating each file at the location C:\Oracle\RMAN


Command File = C:\Oracle\RMAN\backup.rcv
















Batch file = C:\Oracle\RMAN\rman_backup.bat















Once you have created both files you just need to ensure that the backup is successful by executing the rman_backup.bat file.  If it is successful, you can set up automated backups by calling the rman_backup.bat through Windows "Scheduled Tasks" program.  The OS user that calls this script will need the "log on as batch" privilege in order for your backups to run while that user is logged off.

Do you need an experienced Oracle DBA to setup and manage your RMAN backups and ensure your database is in good health without costing a fortune?  Check out my services and contact me with any questions.


No comments:

Post a Comment