Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking stored procedures

Status
Not open for further replies.

graabein

Programmer
Oct 9, 2002
186
NO
Hi, I have a question similar to thread183-1370666.

I have two stored procedures. PageCheck reads table PageIndex and sometimes updates a corresponding table, and PageEdit marks records (pages) in PageIndex as "dirty" so when the next read comes in with PageCheck the table gets rebuilt.

I'm afraid these two will be run at the same time so I can lose changes when I have a lot of user activity. I figure I have to put a lock on PageIndex table when I do updates to it and maybe on the corresponding table when a page gets rebuilt. Either that or put a lock on some code in the stored procedure so it gets run exclusively.

Am I right or does SQL Server 2000 work different than I think? Any suggestions on this?

[elephant2]
graabein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top