Oracle creates automatically executed exp tasks

Source: Internet
Author: User

Compile a doscommand script to generate a batch command file, and then add a scheduled task to the host server.
 
Backup method:
 
Create a bak folder in the root directory of any disk, create week0.dmp In the bak folder, copy the following DOS command to the new txt, change x: \ to the actual path, and then change *. the txt command is zlautoexp. bat batch files.
 
@ ECHOOFF
 
 
Ifexist x: \ bak \ WEEK0.DMP X: \ Oracle \ product \ 10.2.0 \ db_1 \ BIN \ Exp.exe userid = sys/hisbuffer = 4096 file = X: \ bak \ WeekBak0.dmp grants = y full = y
 
Ifexist x: \ bak \ WEEK1.DMP X: \ oracle \ product \ 10.2.0 \ db_1 \ BIN \ Exp.exe userid = sys/hisbuffer = 4096 file = X: \ bak \ WeekBak1.dmp grants = y full = y
 
Ifexist x: \ bak \ WEEK2.DMP X: \ oracle \ product \ 10.2.0 \ db_1 \ BIN \ Exp.exe userid = sys/hisbuffer = 4096 file = X: \ bak \ WeekBak2.dmp grants = y full = y
 
Ifexist x: \ bak \ WEEK3.DMP X: \ oracle \ product \ 10.2.0 \ db_1 \ BIN \ Exp.exe userid = sys/hisbuffer = 4096 file = X: \ bak \ WeekBak3.dmp grants = y full = y
 
Ifexist x: \ bak \ WEEK4.DMP X: \ oracle \ product \ 10.2.0 \ db_1 \ BIN \ Exp.exe userid = sys/hisbuffer = 4096 file = X: \ bak \ WeekBak4.dmp grants = y full = y
 
Ifexist x: \ bak \ WEEK5.DMP X: \ oracle \ product \ 10.2.0 \ db_1 \ BIN \ Exp.exe userid = sys/hisbuffer = 4096 file = X: \ bak \ WeekBak5.dmp grants = y full = y
 
Ifexist x: \ bak \ WEEK6.DMP X: \ oracle \ product \ 10.2.0 \ db_1 \ BIN \ Exp.exe userid = sys/hisbuffer = 4096 file = X: \ bak \ WeekBak6.dmp grants = y full = y
 
 
 
Ifexist x: \ bak \ WEEK6.DMP ren x: \ bak \ WEEK6.DMP WEEK7.DMP
 
Ifexist x: \ bak \ WEEK5.DMP ren x: \ bak \ WEEK5.DMP WEEK6.DMP
 
Ifexist x: \ bak \ WEEK4.DMP ren x: \ bak \ WEEK4.DMP WEEK5.DMP
 
Ifexist x: \ bak \ WEEK3.DMP ren x: \ bak \ WEEK3.DMP WEEK4.DMP
 
Ifexist x: \ bak \ WEEK2.DMP ren x: \ bak \ WEEK2.DMP WEEK3.DMP
 
Ifexist x: \ bak \ WEEK1.DMP ren x: \ bak \ WEEK1.DMP WEEK2.DMP
 
Ifexist x: \ bak \ WEEK0.DMP ren x: \ bak \ WEEK0.DMP WEEK1.DMP
 
Ifexist x: \ bak \ WEEK7.DMP ren x: \ bak \ WEEK7.DMP WEEK0.DMP
 
@ ECHOON
 
 
Then, add zlautoexp's scheduled task execution time to the scheduled task in the control panel, and adjust the backup time as needed. The administrator user must add a password to the user.
 
 
Or enter the following command at the doscommand prompt to implement automatic backup:
 
At2: 00/every: m, t, w, th, f, s, su "X: \ bak \ zlautoexp. bat"
 
Automatic file backup path seven days a week
 
 
Similarly, adding host strings to zlautoexp also enables remote automatic logical backup on the workstation.
 
Add an automatic backup Task: Make sure that the Task Scheduler in the service is enabled, and the automatic backup command entered in the command prompt is automatically executed in the background. No prompt is displayed on the foreground.

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.