Solved

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

Posted on 2010-11-23
3
1,004 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

617 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