If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Running DTS Package using ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-20-04, 13:52
ramanjaiya ramanjaiya is offline
Registered User
 
Join Date: Mar 2004
Posts: 10
Cool 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.
Reply With Quote
  #2 (permalink)  
Old 05-20-04, 19:16
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On