Oralce database scheduled backup

In the windows server, the database is regularly backed up (full backup).

Create a bat file with the content:

set dd=%date:~8,2%
set mm=%date:~5,2%
set yy=%date:~0,4%
set folder=%yy%-%mm%-%dd%

md D:\db_backup\%folder%

exp db_name/[email protected]/orcl file=D:\db_backup\%folder%\database.dmp

db_name: database user name

db_pwd: database user password

127.0.0.1: Database server address

orcl: database instance name

Executing the bat file will generate the following files:

The execution operation of the bat file can be added to the task scheduler of windows and executed regularly. For example, to execute at 1 am every day, the operation is as follows:

 

Guess you like

Origin blog.csdn.net/liangmengbk/article/details/130353606
Recommended