Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem running DTS package from classic asp page

Status
Not open for further replies.

panini

MIS
Jun 1, 2001
136
GB
I'm trying to run a DTS script that copies tables to from a dev server up to a live server. The DTS script works fine with a right click and execute.

I've been using these two pages as examples.


My code is attached - i've tried varying the usernames and passwords and the permissions within the SQL and the asp for the usernames i try and it doesn't seem to be falling over there - instead i'm getting a package failed sort of error on the first task - with a "copy SQL server objects" failure.

I've tried taking all the stuff out of the DTS package so it doesn't copy anything and i still get the same error.

2nd day now and i'm going to start hitting my head on the desk soon....


CODE:


<%

Option Explicit

Dim oDTS
Dim vErrorMessage
Dim vCount

Dim vServer
Dim vUser
Dim vPassword
Dim vPackage

vPackage = "HARE_IRELAND2"
vServer = "ESSS01"
vUser = "DTSLauncher"
vPassword = "r0cket$"

Set oDTS = Server.CreateObject("DTS.Package")
oDTS.LoadFromSQLServer vServer, vUser, vPassword, 0, "", "", "", vPackage
oDTS.Execute

For vCount = 1 To oDTS.Steps.Count

'If oDTS.Steps(vCount).ExecutionResult = 1 Then
vErrorMessage = vErrorMessage + "<p>Step " & vCount & " : " & oDTS.Steps(vCount).Name + " failed. " + chr(13)
'End If

Next

If vErrorMessage = "" Then
Response.Write "Success"
Else
Response.Write vErrorMessage
End If


Response.Write "<p>ASP Error : " & Err.Description

Set oDTS = Nothing
%>
 
Does the login you are using have the appropriate permissions to copy the objects in question?

[small]----signature below----[/small]
I'm pushing an elephant up the stairs

My Crummy Web Page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top