====================================================================
@echo off

set y=%date:~0,4%
set m=%date:~5,2%
set d=%date:~8,2%

set h=%time:~0,2%
set n=%time:~3,2%
set s=%time:~6,2%
set ms=%time:~9,2%

set f_name=%y%%m%%d%%h%%n%

cd D:/DataBackUp/

echo 开始 EXP 数据库中 U 用户的数据

exp u/p@ORCL file=U_%f_name% owner=U log=exp_U%f_name%.log feedback=100
====================================================================

COPY以上脚本到文本文件,扩展名改为BAT,将该批处理文件添加到系统任务计划中即可定时备份Oracle数据库指定用户的数据。

简要说明:

set y=%date:~0,4% 可得到4位年份,后面的月日时分秒毫秒同理,这么做只为避免文件名重复。

相关文章:

  • 2021-11-30
  • 2021-12-18
  • 2021-12-04
  • 2022-01-14
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-30
  • 2021-06-19
  • 2021-12-29
  • 2022-01-19
  • 2022-12-23
  • 2022-02-08
相关资源
相似解决方案