如何在客户端调用SQLSERVER的DTS包?
2007-11-11 04:09:08 来源:WEB开发网核心提示: @dtsrun /S %1 /U %2 /P %3 /N %4 >> %LOGFILE% if errorlevel 1 goto Error echo %TIME% Manual DTS package end......... >> %LOGFILE% echo -- >
@dtsrun /S %1 /U %2 /P %3 /N %4 >> %LOGFILE%
if errorlevel 1 goto Error
echo %TIME% Manual DTS package end......... >> %LOGFILE%
echo ------------------------------------------ >> %LOGFILE%
PAUSE
goto FINISH
:Error
echo ------------------------------------------- >> %LOGFILE%
echo DTSRUN ERROR PLS CHECK LOG .........
echo %TIME% GlobalStore Backup abnormal end. >> %LOGFILE%
pause
goto FINISH
:Usage
echo.
echo Usage:crundts %1 servername %2 use_name %3 password %4 dts_name
:FINISH
4.保存该文件:
然后你可以在任何程序中调用,也可以手工执行,输入参数
5.测试运行:
在DOS提示符下运行:CRUNDTS SERVERNAME sa password DTS_ExcelToSqlserver
6.日志信息:
10:24:29.38 Manual DTS package start run.........
------------------------------------------
DTSRun: Loading...
更多精彩
赞助商链接