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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a DTS from VB6 as a service

Status
Not open for further replies.

pkailas

Programmer
Jun 10, 2002
555
US
I am having a bit of a problem that I hope someone has solved in the past.

I have an application that launches a DTS through VB6 which runs fine if I'm logged onto the PC that runs it. In otherwords, if I'm logged in and execute my application the DTS runs successfully.

Now here's the problem. I have Techscheduler running my app at certain times. Since this method lauches the application in the background as a "service" the DTS never executes. I'm passing the id and password for the SQL server and like I said, it runs if I run it from console or from a Terminal Services session directly.


Does anyone have any solutions? Here's the code that I use in the app.

Dim oPackage As New DTS.Package

oPackage.LoadFromSQLServer _
ServerName:="onbase", _
ServerUserName:="sdsadmin", _
ServerPassword:="secure", _
PackageName:="CreateARCheckIndex"
oPackage.Execute
Set oPackage = Nothing
 
Is the application a standalone exe or an active x exe?

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
It's a standalone exe. However, I did figure it out. Reading all the threads on DTS running as a job gave me the answer. The application event launcher "Techscheduler" service needed to log on as a domain user instead of the local system account. once I made this change the DTS would run.

Thanks though..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top