Windows下设置oracle数据库定时备份
时间:2021-07-01 10:21:17
帮助过:22人阅读
echo backup oracle database......
2 echo %~dp0
3 set file_dir=%~dp0
4
5 echo backup time......
6 set "
year=%date:~0,4%"
7 set "
month=%date:~5,2%"
8 set "
day=%date:~8,2%"
9 set "
hour_ten=%time:~0,1%"
10 set "
hour_one=%time:~1,1%"
11 set "
minute=%time:~3,2%"
12 set "
second=%time:~6,2%"
13
14 set mydate
15
16 if "
%hour_ten%" == "
" (
17 mydate=%year%%month%%day%0%hour_one%%minute%%second%
18 )
else (
19 mydate=%year%%month%%day%%hour_ten%%hour_one%%minute%%second%
20 )
21
22 exp USER/PWD@SID file=file_dir\yr_database_backup_%mydate%.dmp owner=OWNER
23 2设置windows定时任务
打开 控制面板-》管理工具-》任务计划程序-》创建基本任务
选择任务的执行时间和相应的脚本
Windows下设置oracle数据库定时备份
标签:col Owner tab 执行 log min data user ...