Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002

    Unanswered: Problem with executing a SQL Server DTS Package from ASP

    Could someone help. I am new at writing scripts to execute a DTS package using ASP. After I run my scripts, I get the following error message :

    Step [DTSStep_DTSDataPumpTask_1] failed
    Task "Import FITA Calendar"

    Package [Import Fita Calendar] failed

    Here is what my scripts look like :

    Const DTSSQLStgFlag_Default = 0
    Const DTSStepExecResult_Failure = 1

    Dim oPkg, oStep, sMessage, bStatus

    Set oPkg = Server.CreateObject("DTS.Package")
    oPkg.LoadFromSQLServer "myserver","sa","$12eww",DTSSQLStgFlag_Default,"", "","","Import FITA calendar"

    bStatus = True

    For Each oStep In oPkg.Steps
    sMessage = sMessage & "<p> Step [" & oStep.Name & "] "
    If oStep.ExecutionResult = DTSStepExecResult_Failure Then
    sMessage = sMessage & " failed<br>"
    bStatus = False
    sMessage = sMessage & " succeeded<br>"
    End If
    sMessage = sMessage & "Task """ & oPkg.Tasks (oStep.TaskName).Description & """</p>"

    If bStatus Then
    sMessage = sMessage & "<p>Package [" & oPkg.Name & "] succeeded</p>"
    sMessage = sMessage & "<p>Package [" & oPkg.Name & "] failed</p>"
    End If

    Response.Write sMessage
    Response.Write "<p>Done</p>"


  2. #2
    Join Date
    Oct 2003

    well do you know how to exec sp in asp

    because I do that alot. And you can exec DTS inside SP. So you can place this inside your sp and just exec from asp. Hope that helps.


    exec master..xp_cmdshell 'dtsrun /Ssql1 /NPublish /E'
    This will execute the DTSRun command line utility with the parameters

    /S = SQL Server Host Name
    /N = DTS Package Name
    You can either use /E for "trusted connection" or /U/P to supply username and passwords

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts