Solved

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

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
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 tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

827 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