Calling a browser through DTS with a scheduled job

  • Hello:

    I am running into a problem I thought was simple, but am stumped.

    I am calling an ASP page with a batch file. This batch file is called in DTS via an Execute Process Task. This works great when run from EM as me, but not when it runs as a scheduled job.

    So, I immediately think, "Oh, it's because SQLAgent is running as a system account or something." Well, SQLAgent logs on as Administrator (not sure I approve of that, but it's not my box).

    I call the boss over and ask him to log me into the box as Administrator. I can still run the DTS package that will call up a browser, but still can't run it through SQLServerAgent/Jobs. Here's what the batch file looks like:

    start http://www.myASPReport.com/report-name.asp

    exit

    The error returned is:

    Executed as user: ABC\Administrator. ...ttp://www.myASPReport.com/report-name.aspThe system cannot find the file http://www.myASPReport.com/report-name.asp. C:\Program Files\Common Files\System\Mapi\1033\NT>exit DTSRun: Loading... DTSRun: Executing... DTSRun OnStart: DTSStep_DTSCreateProcessTask_1 DTSRun OnError: DTSStep_DTSCreateProcessTask_1, Error = -2147220330 (80040496) Error string: CreateProcessTask 'DTSTask_DTSCreateProcessTask_1': Process returned code 9059, which does not match the specified SuccessReturnCode of 0. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4900 Error Detail Records: Error: -2147220330 (80040496); Provider Error: 0 (0) Error string: CreateProcessTask 'DTSTask_DTSCreateProcessTask_1': Process returned code 9059, which does not match the specified SuccessReturnCode of 0. Error source: Mi... Process Exit Code 1. The step failed.

    Is it because the Administrator account can't open a browser for some reason?

    If anyone thinks it's stupid to call a browser through ASP, let me know another approach where I won't have to rewrite 1200 lines of spaghetti!!

    Thanks much,

    Mark

  • My question would be why are you calling this up as a scheduled DTS package and not just using the Windows Scheduler for it. If it is part of a bigger DTS package then maybe you can break it up and schedule it. I don't use the sql job scheduler. I schedule all my jobs using Windows scheduler. This gives me the ability to run the job using an account that is specifically created for it and not have to worry about the account that sql runs under. I was asked to have sql use an domain admin account once..... they didn't like my answer...

    I hope that this helps..

    Michael

  • Thanks Michael:

    I will try the Scheduler instead, again, I bet it runs under the Administrators account and I don't have easy access to it, but it makes more sense than trying to run it through DTS.

    Thanks again,

    Mark

  • Windows scheduler allows you to supply the logon details (username/password) for the account to use. I do the whole thing differently to the accepted way that others do it. You can use the DTSRun command in a batch file or from the command prompt. I take the command string that SQL creates when you create a job to run it..

    DTSRun /~S 0xDD783089924AFF2BB7F1D3DFFCB443CB /~N 0x002B33852AEE742ADBB9518AB4E0D814CC93610A1CE261D3B69966935A3477B8 /E

    When you do it my way you get a string similar to above. You can us the DTSRun differently with the name of the package etc if you wish.. If you want instructions on how I do it I can include them.

    I hope that this makes it easier for you.

    Michael

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply