Current location - Health Preservation Learning Network - Slimming men and women - How to create a plan to delete database backup data in sqlserver2008 (sqlserver Maintenance Plan Backs up Database)
How to create a plan to delete database backup data in sqlserver2008 (sqlserver Maintenance Plan Backs up Database)
ORACLE backup files can be automatically generated by date by using ORACLE's task plan, batch file and EXP export function, which greatly facilitates ORACLE data backup.

Recommendation 1 (weekly backup, compressed into RAR) The following are the batch file contents of ORACLE automatic backup, please cooperate with the task plan:

Example:

@ECHOOFF

SETBACKPATH=d:

ECHO is going to back up the database.

REM7-day cycle

If% %BACKPATH%ONEGOTOONE exists.

IFEXIST%BACKPATH%TWOGOTOTWO

if exist % back path % three goto tree

If% BACKPATH% FOURGOTOFOUR exists,

IFEXIST%BACKPATH%FIVEGOTOFIVE

IFEXIST%BACKPATH%SIXGOTOSIX

If there is %BACKPATH%SEVENGOTOSEVEN,

ECHOE

: one

SETBACKPATH_FULL=%BACKPATH%ONE

REN%BACKPATH%ONETWO

Gotobak

: two

SETBACKPATH_FULL=%BACKPATH%TWO

REN % BACKPATH %

Gotobak

: three

SETBACKPATH _ FULL = % BACKPATH % THREE

REN % BACKPATH %

Gotobak

: four

set back path _ FULL = % back path % FOUR

REN % BACKPATH %

Gotobak

: five

set back path _ FULL = % back path % FIVE

REN % BACKPATH %

Gotobak

: six

SETBACKPATH_FULL=%BACKPATH%SIX

REN % BACKPATH %

Gotobak

: seven

set back path _ FULL = % back path % SEVEN

REN%BACKPATH%SEVENONE

Gotobak

: return

EXPense/ense file = % back path _ FULL %。 DMP

RARa%BACKPATH_FULL%。 rar%BACKPATH_FULL%。 DMP

DEL%BACKPATH_FULL%。 DMP

SETBACKPATH=

SETBACKPATH_FULL=

export

Description:

The file name is named after the week.

Call rar for compression after backup.

This can save a week's historical data.

Note: you need to copy the rar.exe in the programfiles/winrar directory to the system system32 directory.

Recommendation 2:

1, batch file backup. bat

expsystem/manager file = d:ackuporacoracle % date:~ 0, 10%。 dmpowner = system log = d:ackupooracleoracle % date:~ 0, 10%。 log

Oracle2006-0 1-09.dmp file will be generated.

expsystem/manager file = d:ackuporacoracle % date:~ 1 1,3%。 dmpowner = system log = d:ackupooracleoracle % date:~ 1 1,3%。 log

Monday in Oracle Bone Inscriptions. Dmp file will be generated, and then a backup file will be saved on a weekly basis. You can flexibly use the $date$ date parameter of ***7 backup file.