Procedure is using server resource but unmanaged how to managed that...
-
Hi Friend, I have one question about database management... I have one Procedure which take 30 min to execute.... I have crate front end for that Process, the scenario is when user press the button to execute that Procedure but find no response and close the browser what happen for that procedure after this, i mean that procedure is executed but did't stop....that procedure is using server resource but unmanaged how to managed that. Thanks and regard's in advance.
Sasmi
-
Hi Friend, I have one question about database management... I have one Procedure which take 30 min to execute.... I have crate front end for that Process, the scenario is when user press the button to execute that Procedure but find no response and close the browser what happen for that procedure after this, i mean that procedure is executed but did't stop....that procedure is using server resource but unmanaged how to managed that. Thanks and regard's in advance.
Sasmi
-
In case of SQL server 2008, the stored procedure won't execute if the calling program is stopped. Which database or you speaking of?
i am talking about sql Server 2005...
-
i am talking about sql Server 2005...
I believe it should also behave the same way. You can try to replicate the scenario using following in the stored procedure:
waitfor delay '00:00:10'
insert into SomeTable values ('some value')This will cause a delay of 10 seconds before the insert. While SQL is waiting for the delay to get over, you can stop the calling application of yours and then check if the insert happened. BTW is 30 min execution time expected or not? If not, you can check the execution plan and it would give you an idea why so much time is taken.
-
Hi Friend, I have one question about database management... I have one Procedure which take 30 min to execute.... I have crate front end for that Process, the scenario is when user press the button to execute that Procedure but find no response and close the browser what happen for that procedure after this, i mean that procedure is executed but did't stop....that procedure is using server resource but unmanaged how to managed that. Thanks and regard's in advance.
Sasmi
First and foremost, what user is going to sit there and wait for 30 minutes for the query to execute? I would spend my time optimising the query rather than worry about what happens WHEN the user closes the browser. Anyone who has a stored proc taking that amount of time to execute while a user sits waiting deserves any and all problems which they get from it.
Bob Ashfield Consultants Ltd