How to back up Oracle batch processing on Windows (with scheduled tasks or third-party timing software, you can achieve automatic backup), oracle Batch Processing
@ Echo start to back up oracle Data
@ Echo off
Set
Set curdir = "D: \ backup"
Echo % curdir %
Set t1 = % Time :~ 0, 1%
If "% t1 %" = "" set t1 = 0
Set td = % Date :~ 0, 4% % Date :~ 5, 2% % Date :~ 8, 2% % t1 :~ 0, 1% % Time :~ 1, 1% % Time :~ 3,2% % Time :~ 6, 2%
Exp naricom/naricom @ SGTMS owner = (mw_app, mw_sys, statdba, dictdba) file = % curdir % \ SGTMS _ % td %. dmp log = % curdir % \ SGTMS _ % td %. log buffer = 800000
Echo creates a compressed file and deletes the log file of the source backup file
Zip % curdir % \ sgtms_rjtd).zip % curdir % \ SGTMS _ % td %. dmp % curdir % \ SGTMS _ % td %. Log
Del % curdir % \ *. dmp
Del % curdir % \ *. Log
Echo completes File compression
@ Echo on
@ Echo end of oracle Data Backup