Q

How to use a wrapper script with cold backups in Oracle

Read about how a wrapper script can be used with cold backups in Oracle and used to check the success of the backup.

I'm new to DBA work and I have an Oracle 8.1.7 database on a Windows 2000 server. I have to make a cold backup through bat files. I have scheduled the jobs in the Windows scheduler, and that part works fine. My question now is, how can I automatically check if the backup has run successfully?

I now check the scheduler log each day but this is not really something I want to be doing manually each day. Something like an email would be easier. How is this normally done?

Today's Oracle DBA typically uses RMAN for backup and recovery. But cold backups from your own scripts are still perfectly acceptable. What I typically do in your scenario is to create a wrapper script for my cold backup script. All the wrapper script does is to call the cold backup script and dump its output to a text file. The last thing the wrapper script does is email the text file's contents to me. So assume the cold backup script is called "cold_backup.bat". The wrapper script can look like the following:

C:script_dircold_backup.bat > C:script_dircold_backup.txt
Mail_routine C:script_dircold_backup.txt oracle_dba@acme.com

The wrapper script is pretty simple. The only thing that is that you need a mail routine to forward the file to you. On Unix/Linux, you could use mailx or something like that. For Windows, I use a utility called Blat for mailing these types of text files to my email account.

Once you have the wrapper script set up, schedule the wrapper script for execution, not the cold backup script.

This was first published in December 2008

Dig deeper on Oracle database administration

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close