orme3
orme3

Reputation:

Stored Procedure and Timeout

I'm running a long process stored procedure.

I'm wondering if in case of a timeout or any case of disconnection with the database after initiating the call to the stored procedure. Is it still working and implementing the changes on the server? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

Upvotes: 0

Views: 1035

Answers (3)

Eric Z Beard
Eric Z Beard

Reputation: 38406

I would suggest running your profiler on the database and watching the activity, and also create a basic test case so that you know for sure what happens. The outcome is dependent on your database and what you are using to connect to it.

Upvotes: 0

Douglas Tosi
Douglas Tosi

Reputation: 2350

It depends on the server I guess.
I know Firebird will detect disconnected clients and stop working.
Anyway if the client is not there to commit at the end of the job the changes should be rolled back by the server.

Upvotes: 1

Yaakov Ellis
Yaakov Ellis

Reputation: 41480

Anyway if the client is not there to commit at the end of the job the changes should be rolled back by the server.

In other words, if you have a stored procedure making changes to the database and there is a possibility that the connection might disconnect in the middle, be sure to enclose all changes within a transaction.

Upvotes: 2

Related Questions