Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    10

    Cool Unanswered: Running DTS Package using ASP

    Hi,
    I am trying to run a DTS Package lying on the DB Server through an ASP, which is lying on the WebServer.

    The DTS Package is trying to access some files on the Hard Disk.

    When I run the package directly by right clicking and executing the package through SQL Server Enterprise, it looks for the files on the DB Server. But when I run the package through the ASP, it looks for the files on the web server.
    Net Net:What is happening is that the DTS Package is looking for the files on the Webserver instead of the database Server.

    The active X Script which is contained in the DTS package looks like this:
    '************************************************* *********************
    ' Visual Basic ActiveX Script
    '************************************************* ***********************
    Function Main()
    Main = DTSTaskExecResult_Success
    Dim obScript,oFSO,x
    Set obScript = CreateObject("csscript.script")
    Set oFSO = CreateObject("Scripting.FileSystemObject")

    Set a=oFSO.OpenTextFile( "D:\Comshare\IntradayLeafLevel\test.out",2,tru e,0)
    a.Writeline("Writing to the file...")
    a.close

    Also the logging of the DTS Package is being made on the webserver( Which mentions it didnt find the file as it looks for the file on the web server)
    Is there some setting which would enable the DTS Package to point to the Database machine instead of the web server?

    Thanks
    Raman.

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    try using unc paths....eg \\server\sharename\folder\filename.ext that would let you point to files on any location...

    as for running dts packages from the web server.... I'd actually suggest creating a job to run the dts package and starting the job from asp rather then running the package directly... this will mean that the package gets executed in the context of the db server not the web server.

Posting Permissions

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