如何为Oracle导出文件加上时间戳

1.windows系统

利用Dos命令取得时间戳:

C:>echo %date%

2007-12-17 星期一

C:\Documents and Settings\Paul Yi>exp username/password@test file=c:\paul%d
ate:~0,10%.dmp

备份生成的文件名为 paul2007-12-17.dmp

 

2.linux/unix系统

datestr=`date +%Y%m%d`
exp system/system wner=test  file=/oraexp/ora9i_test_$datestr.dmp log=/or
aexp/ora9i_test_$datestr.log

备份生成的文件名ora9i_test_20071217.dmp

 

 

 

 

 

请使用浏览器的分享功能分享到微信等