Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Backup using Windows Scheduler

Status
Not open for further replies.

acct98

IS-IT--Management
Aug 15, 2002
194
US
Has anyone tryied to backup an oracla db using Window scheduler? I have oracle installed on Windows XP.
 
Do it all the time. I wrote a batch file that contains code like the following:
Code:
REM ************************
REM * Timestamp a log file *
REM ************************
echo Start SATR Instance Backup: > d:\Oracle\Exports\Logs\Oracle_Backups.log
date /T >> d:\Oracle\Exports\Logs\Oracle_Backups.log
time /T >> d:\Oracle\Exports\Logs\Oracle_Backups.log
echo. >> d:\Oracle\Exports\Logs\Oracle_Backups.log

REM ************************
REM * Stop the Oracle service *
REM ************************
netsvc OracleServiceSATR \\D740019 /stop

REM ************************
REM * Wait for it to stop *
REM ************************
sleep 30

REM ************************
REM * Delete last backup *
REM ************************
DEL /Q \\D740009\74OracleBack09\SATR\*.*

REM ************************
REM * Copy Oracle data files *
REM ************************
copy D:\Oracle\Oradata\SATR\*.* \\D740009\74OracleBack09\SATR\*.* >> D:\Oracle\Exports\Logs\Oracle_Backups.log

REM ************************
REM * Copy startup scripts *
REM ************************
copy D:\Oracle\Ora817\sysman\ifiles\def_SATR.SBC.COM.ora \\D740009\74OracleBack09\SATR\def_SATR.SBC.COM.ora >> D:\Oracle\Exports\Logs\Oracle_Backups.log

REM ************************
REM * Restart service *
REM ************************
netsvc OracleServiceSATR \\D740019 /start

REM ************************
REM * Timestamp complete *
REM ************************
echo Finished SATR Instance Backup: >> D:\Oracle\Exports\Logs\Oracle_Backups.log
date /T >> D:\Oracle\Exports\Logs\Oracle_Backups.log
time /T >> D:\Oracle\Exports\Logs\Oracle_Backups.log
echo. >> D:\Oracle\Exports\Logs\Oracle_Backups.log
I have this scheduled to run weekly at a certain time through the scheduler.

Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
I run several jobs on windows 2000 server scheduler.. I have found that the jobs hang every now and then, so if you are using it for backups be sure to take a look at the scheduled job to make sure it ran successfully.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top