Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Batch file for Export Job

user545194Jun 29 2007 — edited Jul 29 2007
Hi,

We created an OS batch file for our daily exports (backups). This file is scheduled to run daily at 7:00 P.M. A test run showed that it did not work. Can somebody find an error in the script?

----------------------------------------------------------------------------------------------------------------------
rem ***** SAMPLE BATCH FILE TO DO DAILY EXPORT ******

@echo Export started at:
@echo

date /T
time /T
rem Here's a one-line NT command (But a long line!)
rem one that splits all the date parts out, outting
rem each one into it's own variable (weekday, day, month, year)
for /f "tokens=1-4 delims=/ " %%a in('date /t') do
(set=weekend=%%a& set day=%%b& set month=%%c& set year=%%d)

set logfile=%year%_%month%_%day%.log
set expfile=%year%_%month%_%day%.exp

set ORACLE_SID=BDC
set ORACLE_HOME=D:\oracle\product\10.2.0

exp system/bdcadmin@bdc full=y grants=y file=D:\export\bdc.dmp log=D:\export\bdc.log compress=N

@echo Export completed at:
@echo

date /T
time /T

rem ************* END OF BATCH FILE *********************
----------------------------------------------------------------------------------------------------------------------

Thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2007
Added on Jun 29 2007
7 comments
1,165 views