Oralce Export script command, timed execution

Source: Internet
Author: User

Original: Oralce Export script command, timed execution

@echo off @echo ================================================

Automated backup scripts for Oracle databases @echo Windows environment

@echo 1, the current date is automatically named when you back up the exported file.

@echo 2, URLs are temporary directories, URLs, is the final save directory, after saving will delete the temporary directory

@echo 3, this is the Oracle 11g Export command, the following is the export of 5 users EXPDP ppp/[email protected] dumpfile=zcjc_ppp_%mydate%_exp.dmp content= All

@echo 4, name the file Xxxxx.bat, my name here is Expdportoracle.bat

@echo 5, script execution time, execute at 02:0/every:m,t,w,th,f,s,su "E:\expbportOracle.bat" in DOS command

@echo 6, delete the task, execute at 1/delete in DOS command

@echo 7. Don't know where to find me ask qq:1216331654

@echo ================================================

Set mydate=%date:~0,4%%date:~5,2%%date:~8,2%

Set years=%date:~0,4%

Set month=%date:~5,2%

Set day=%date:~8,2%

Set Urls=e:\app\administrator\admin\zcjc\dpdump set Url=e:\expbportoracle

MD%url%\%years% MD%url%\%years%\%month% MD%url%\%years%\%month%\%day%

EXPDP ppp/[email protected] dumpfile=zcjc_ppp_%mydate%_exp.dmp Content=all

EXPDP aus/[email protected] dumpfile=zcjc_aus_%mydate%_exp.dmp Content=all

EXPDP cif/[email protected] dumpfile=zcjc_cif_%mydate%_exp.dmp Content=all

EXPDP spm/[email protected] dumpfile=zcjc_spm_%mydate%_exp.dmp Content=all

EXPDP ua/[email protected] dumpfile=zcjc_ua_%mydate%_exp.dmp Content=all

Copy "%urls%\zcjc_ppp_%mydate%_exp.dmp" "%url%\%years%\%month%\%day%"

Copy "%urls%\zcjc_aus_%mydate%_exp.dmp" "%url%\%years%\%month%\%day%"

Copy "%urls%\zcjc_cif_%mydate%_exp.dmp" "%url%\%years%\%month%\%day%"

Copy "%urls%\zcjc_spm_%mydate%_exp.dmp" "%url%\%years%\%month%\%day%"

Copy "%urls%\zcjc_ua_%mydate%_exp.dmp" "%url%\%years%\%month%\%day%"

Del%urls%\zcjc_ppp_%mydate%_exp.dmp

Del%urls%\zcjc_aus_%mydate%_exp.dmp

Del%urls%\zcjc_cif_%mydate%_exp.dmp

Del%urls%\zcjc_spm_%mydate%_exp.dmp

Del%urls%\zcjc_ua_%mydate%_exp.dmp

Exit

Oralce Export script command, timed execution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.