Oracle11G手动导出数据库脚本(支持空表)

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

SET NLS_LANG=AMERICAN_AMERICA.AL32UTF8

SET USER=test
SET PASSWORD=test
SET DATABASE=ORCL
SET TODAY=%date:~0,4%%date:~5,2%%date:~8,2%
SET SUFFIX=01
SET BACKUP_DIR=.\
SET DMP_FILE=%BACKUP_DIR%%USER%_%TODAY%_%SUFFIX%.dmp
SET LOG_FILE=%BACKUP_DIR%%USER%_%TODAY%_%SUFFIX%.exp.log
SET EXP_CMD=exp %user%/%password%@%database% file=%DMP_FILE% log=%LOG_FILE% owner=%USER%


ECHO ALER EMPTY TABLES
SQLPLUS %USER%/%PASSWORD%@%DATABASE% @readyfor11g.sql
SQLPLUS %USER%/%PASSWORD%@%DATABASE% @executefor11g.sql > execute_result.log
ECHO %EXP_CMD%
PAUSE
CALL %EXP_CMD%
PAUSE