April 8, 2002 at 3:15 pm
Hi everybody!
I have this code that runs the DTS package(located on computer X) from a webpage located on computer Y.
<%
Dim objPkg, strError, iCount
'Create and Execute the package
Set objPkg = Server.CreateObject("DTS.Package")
'objPkg.LoadFromSQLServer "783UIR", "sa", "", ,"","","","B2BDTS"
objPkg.Execute
For iCount = 1 To objPkg.Steps.Count
If objPkg.Steps(iCount).ExecutionResult = 1 Then
strError = strError + objPkg.Steps(iCount).Name + " failed. <br>"
End If
Next
If strError = "" Then
Response.Write "Success"
Else
Response.Write strError
End If
Set objPkg = Nothing
%>
If the webpage is on computer X (where the package is) everthing goes well. But if the webpage is on computer Y then the code from above can not execute the DTS package. Is there any permission settings that I didn't configure?
Thanks a lot!
Duruguru
April 8, 2002 at 5:01 pm
Is the Microsoft DTSObjectLibaray dll <dtspkg.dll> installed on server Y? Does objPkg get created ok?
April 8, 2002 at 5:24 pm
Yes! The dtspkg is there. If the package and the asp file is on the same machine (X or Y) everything works well. The problem is only when I split them. One of server X (the IIS Server) and one on SQL Server 7.0 (Y)
April 8, 2002 at 5:28 pm
ok, so you can create the object. What does the DTS package do? Does the package need file access or rights on the network? What does strError return?
April 8, 2002 at 5:37 pm
I found here a topic on the issue that I have:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q252987
When you execute a DTS Package from an ASP page, the package executes in the security context of the Web site visitor, which may be that of the Windows user (if the web site is configured for Basic or NT Authentication) or of the Anonymous account. The package does not execute in the security context of the user ID supplied to load the package from SQL Server. Therefore, it is important to make sure that the account executing the package has appropriate Windows permissions to all resources that the package may use--such as disk files, DLLs, or other drivers (for import/export operations)--especially when the Web site is configured for Anonymous access. If a package works in the DTS designer and works from other client applications, but fails from Web applications, troubleshooting should begin with permissions issues.
It's sounds great but I tryed to set permission on the DTS package but I didn't found where to set it up. The IIS is using NT Authentication so I should know the user who is trying to run the package. Can you give me some ideas on that?
Thanks a lot!
April 8, 2002 at 5:43 pm
That's the road I was going down. You're passing LoadFromSQLServer the SQL login, not an NT login. The package is going to run under the context of IIS (whatever that is). We have an Intranet guy that chops SQL Developers fingers off if we even think of messing with his boxes. Sorry, he's gone for the day. This kb article looks at the same problem from a FileSystemObject perspecitive and offers a solution that may help you out:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q197964
Good luck!
John
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply