Solved

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

Posted on 2010-11-23
3
981 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 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now