imp和exp这些oracle命令的命令行返回值都是什么
imp和exp这些oracle命令的命令行返回值都是什么,windows下的,查资料查不到,谁知道告诉下
[解决办法]
参见: http://www.dba-oracle.com/t_scripts_windows_export.htm
以及Oracle的matelink
c:> exp=%PARFILE%:
REM +--------------------------------------+
REM
[解决办法]
VALIDATE COMMAND-LINE PARAMETERS
[解决办法]
REM +--------------------------------------+
if (%1)==() goto USAGE
if (%2)==() goto USAGE
if (%3)==() goto USAGE
REM +--------------------------------------+
REM
[解决办法]
VALIDATE ENVIRONMENT VARIABLES
[解决办法]
REM +--------------------------------------+
REM set ORABACKUP=C:\oracle\orabackup\JEFFDB\export
REM set ORALOG=C:\oracle\custom\oracle\log
REM set ORATMP=C:\oracle\custom\oracle\temp
if (%ORALOG%)==() goto ENV_VARIABLES
if (%ORATMP%)==() goto ENV_VARIABLES
if (%ORABACKUP%)==() goto ENV_VARIABLES
REM +--------------------------------------+
REM
[解决办法]
DECLARE ALL GLOBAL VARIABLES.
[解决办法]
REM +--------------------------------------+
set FILENAME=export_backup_online_full_9i
set DB_USERNAME=%1%
set DB_PASSWORD=%2%
set TNS_ALIAS=%3%
set PARFILE=%ORATMP%\%FILENAME%_%TNS_ALIAS%.parfile
set LOGFILE=%ORALOG%\%FILENAME%_%TNS_ALIAS%.log
set DUMPFILE=%ORABACKUP%\exp_full_%TNS_ALIAS%.dmp
REM +--------------------------------------+
REM
[解决办法]
REMOVE OLD LOG AND PARAMETER FILE(S).
[解决办法]
REM +--------------------------------------+
del /q %PARFILE%
del /q %LOGFILE%
REM +--------------------------------------+
REM
[解决办法]
WRITE EXPORT PARAMETER FILE.
[解决办法]
REM +--------------------------------------+
echo userid=%DB_USERNAME%/%DB_PASSWORD%@%TNS_ALIAS% > %PARFILE%
echo buffer=50000000 >> %PARFILE%
echo file=%DUMPFILE% >> %PARFILE%
echo compress=n >> %PARFILE%
echo grants=y >> %PARFILE%
echo indexes=y >> %PARFILE%
echo direct=no >> %PARFILE%
echo log=%LOGFILE% >> %PARFILE%
echo rows=y >> %PARFILE%
echo consistent=y >> %PARFILE%
echo full=y >> %PARFILE%
REM echo owner=(SCOTT) >> %PARFILE%
REM echo tables=(EMP, DEPT) >> %PARFILE%
echo triggers=y >> %PARFILE%
echo statistics=none >> %PARFILE%
echo constraints=y >> %PARFILE%
REM +--------------------------------------+
REM
[解决办法]
MOVE OLD EXPORT (DUMP) FILE.
[解决办法]
REM +--------------------------------------+
del /q %DUMPFILE%.backup
move %DUMPFILE% %DUMPFILE%.backup
REM +--------------------------------------+
REM
[解决办法]
PERFORM EXPORT.
[解决办法]
REM +--------------------------------------+
exp parfile=%PARFILE%
REM +--------------------------------------+
REM
[解决办法]
SCAN THE EXPORT LOGFILE FOR ERRORS.
[解决办法]
REM +--------------------------------------+
echo ...
echo Analyzing log file for EXP- errors...
findstr /I /C:"EXP-" %LOGFILE%
if errorlevel 0 if not errorlevel 1 echo EXP- Errors: %FILENAME% %TNS_ALIAS% %COMPUTERNAME% %DATE% %TIME% %LOGFILE%
echo ...
echo Analyzing log file for ORA- errors...
findstr /I /C:"ORA-" %LOGFILE%
if errorlevel 0 if not errorlevel 1 echo ORA- Errors: %FILENAME% %TNS_ALIAS% %COMPUTERNAME% %DATE% %TIME% %LOGFILE%
echo ...
echo Analyzing log file for warnings...
findstr /I /C:"Export terminated successfully with warnings" %LOGFILE%
if errorlevel 0 if not errorlevel 1 echo WARNING: %FILENAME% %TNS_ALIAS% %COMPUTERNAME% %DATE% %TIME% %LOGFILE%
echo ...
echo Analyzing log file for errors...
findstr /I /C:"Export terminated unsuccessfully" %LOGFILE%
if errorlevel 0 if not errorlevel 1 echo ERROR: %FILENAME% %TNS_ALIAS% %COMPUTERNAME% %DATE% %TIME% %LOGFILE%
echo ...
echo END OF FILE REPORT
echo Filename : %FILENAME%
echo Database : %TNS_ALIAS%
echo Hostname : %COMPUTERNAME%
echo Date : %DATE%
echo Time : %TIME%
echo EXP Log File : %LOGFILE%