Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Run ASP page from Sql Server

Author  Topic 

sw26p2
Starting Member

8 Posts

Posted - 2010-05-18 : 13:43:39
I need to run an ASP page from Sql Server as a Scheduled Job that will run every 15 minutes. Right now the ASP page just writes a record with a time stamp to a text file.

I have tried 2 different methods that both work about 12 times and then stop. If I View History for the Jobs there are no errors. If Sql Server is restarted, they work again for about 12 times.

Is there some limit to the number of times that WScript.Shell or xp_cmdShell can be called from Sql Server?

1st Method:
Sql Server Job -
Step Type: ActiveX, Language: VB Script - Creates WScript.Shell object that runs ASP page


2nd Method:
Sql Server Job –
Step Type: T-SQL - Executes Stored Procedure
- Stored Procedure - Runs xp_cmdShell which calls vbs script
- VBS script - Creates WScript.Shell object that runs ASP page

If I run the vbs script manually, it works even after the Job stops working.

Please let me know if you need more information.

Any help would be greatly appreciated!
Thank you

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-18 : 14:15:22
There is no limit on xp_cmdshell as I've got jobs that run every 15 minutes that use xp_cmdshell. I don't have any information as to why you are encountering this strange issue. Have you considered opening a case with Microsoft directly as perhaps you are encountering a bug?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -