I am trying to trouble shoot a DTS Package Execution script run from asp. The DTS package runs fine in SQL, the permissions have been set to allow access to the .dll for the internet user account, we are using the sa login to connect to the source database and the highest level login for the destination database, both are MSSQL but still the script errors on the first step. Any suggestions are appreciated.
I can find many requests for help regarding this issue online but no solutions, its a doozy.
I can find many requests for help regarding this issue online but no solutions, its a doozy.
Code:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE>DTS EXECUTE FOR PACKAGE</TITLE>
<!--METADATA TYPE="TypeLib" NAME="Microsoft DTSPackage Object Library" UUID="{10010001-EB1C-11CF-AE6E-00AA004A34D5}" VERSION="2.0"-->
</HEAD>
<BODY>
<%
Dim objPkg, strError, iCount
'Create and Execute the package
Set objPkg = Server.CreateObject("DTS.Package")
objPkg.LoadFromSQLServer "DBSERVER","sa","password_removed",DTSSQLStgFlag_Default,"","","","Transfer_Data"
objPkg.Execute
'Check For Errors
For iCount = 1 To objPkg.Steps.Count
If objPkg.Steps(iCount).ExecutionResult = DTSStepExecResult_Failure Then
strError = strError + objPkg.Steps(iCount).Name + " failed. " + chr(13)
End If
Next
If strError = "" then
Response.Write "Success"
Else
Response.Write strError
End if
set objPkg = Nothing
Response.End
%>
</BODY>
</HTML>
