Solved

Execute an SQL Server 2008 Stored Procedure via PHP/Zend DB with no response

Posted on 2010-11-23
3
991 Views
Last Modified: 2012-05-10
Hi there everyone,

I'm looking to execute a 6-7 minute long SQL Server sproc via Zend_DB PHP, but don't want the page to hang while the procedure executes, I just want to set it running in the database then forget about it. Is there a way to do this?
0
Comment
Question by:wellso
3 Comments
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 100 total points
ID: 34195580
you could create a sql job ad-hoc, to run once (delete_level = 1):
http://msdn.microsoft.com/en-us/library/ms182079.aspx

and add 1 job step (which is your sql you want to run):
http://msdn.microsoft.com/en-us/library/ms187358.aspx

finally start the job:
http://msdn.microsoft.com/en-us/library/ms186757.aspx

note: all those procedure above are in the msdb database, so you need to refer to that db....

you can, of course, create a procedure in your database, that automates all of the above, and just call that procedure from your web code (recommended)
0
 
LVL 2

Author Comment

by:wellso
ID: 34195597
Im stuck with 2008 express at the moment so don't have access to the Agent Service unfortunatly, I was thinking maybe executing it via a command line call in PHP, although as the database is on a different server I am not 100% sure how to do this.
0
 
LVL 6

Accepted Solution

by:
subhashpunia earned 400 total points
ID: 34195604
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question