Small Data volume Oracle user physical backup under Windows system

Source: Internet
Author: User

Environment: Windows Server 2003 Oracle 10g, Inter-system backup

The target system creates the shared file, and the original system mounts the shared directory

Write batch script, call with scheduled task

Rem*Because the system real-time requirements are not very high, the amount of data is small, and only one disk, consider offsite backup*Rem*Offsite backup use EXPDP out of schema Thuniitsmuser*Rem*Copy the dump file to 192 using the shared file mode of Windows commands.168.1.47 Up*Rem* Create or ReplaceDirectory Dump_dir as 'E:\itsm_backup\dump_dir';*Rem* 'copy/y e:\itsm_backup\dump_dir*.* \\Shouhou47\itms_databak\';*Rem*This script is called by the Windows scheduled task every weekday 23:05,*Rem*Keep a 7-day backup and delete the backup seven days ago*Rem*If the system password changes remember to change the password for the scheduled task,*Rem*If 47 password changes remember to modify the password in the script to access 47*Rem*Created byZen at the/Ten/ +Week 210: -:31.86                             *EchobeginTime:%Date%%Time%E:CD E:\itsm_backup\dump_dirSetOracle_home=D:\oracle\product\10.2.0\db_1SetOracle_sid=ItsmdbSetToday=%Date~0,4%%Date~5,2%%Date~8,2%Rem Set Dump directorySetDumpdir=E:\itsm_backup\dump_dirRem setting up specific filesSetDumpf=Thuniitsmuser%Today%Rem If the file already exists deleteifExist%Dumpdir%%Dumpf%.LogDel%Dumpdir%%Dumpf%.LogifExist%Dumpdir%%Dumpf%. DMP Del%Dumpdir%%Dumpf%. Dmpecho EXPDPbegin:%Date%%Time%Rem export SCHEMAEXPDP \ "/  asSysdba\ "DumpFile=%Dumpf%. DMP DIRECTORY=Dump_dir SCHEMAS=Thuniitsmuser logfile=%Dumpf%.LogEcho EXPDPEnd:%Date%%Time%Rem******************************************************************Rem Mount remote directoryifexist z:net UseZ:/DeleteNet UseZ: \ \192.168.1.47\itms_databak/User: "Administrator" "esenshz2014a" Rem set backup directorySetBackup_dir=Z:SetDumpf=Thuniitsmuser%Today%Rem Determines whether a file exists in the destination directoryifExist%Backup_dir%%Dumpf%.LogDel%Backup_dir%%Dumpf%.LogifExist%Backup_dir%%Dumpf%. DMP Del%Backup_dir%%Dumpf%. Dmprem transfer to a backup place copy/Y%Dumpdir%%Dumpf%.Log %Backup_dir%%Dumpf%.LogCopy/Y%Dumpdir%%Dumpf%. DMP%Backup_dir%%Dumpf%. Dmprem Delete the exported data file and its log del%Dumpdir%%Dumpf%. Dmpdel%Dumpdir%%Dumpf%.LogRem******************************************************************Rem Delete backup seven days agoSet /A passdays=%Today%-7SetDumpf=%Backup_dir%Thuniitsmuser%Passdays%RemIF [ not]EXIST filename commandIFExist%Dumpf%.LogDel%Dumpf%.LogRem del%Dumpf%.LogIFExist%Dumpf%. DMP Del%Dumpf%. Dmprem Deleting a remote directoryifexist z:net UseZ:/DeleteEcho BatEnd:%Date%%Time%

Small Data volume Oracle user physical backup under Windows system

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.