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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Lock causing Stored Proc to fail

Status
Not open for further replies.

dr486

Programmer
Jan 9, 2002
105
0
0
AU
If a Stored Proc (SP1) calls another Stored Proc (SP2) and the called Stored Proc (SP2) hangs on a page or table lock, will SQL Server then Kill the whole process (SP1 and SP2) or will it only Kill the called Stored Proc (SP2) and return to the calling procedure (SP1)
 
It depends on the failure level that is returned.

A lock on a table by it self won't cause a failure of a procedure. The procedure will wait until the lock is released.

If the procedure has the lock timeout set then again it will depend on the severity of the errorlevel.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Im using SQL Server 2000

On the dev servers, which are apparently a mirror of production, I receive error 1222 on a lock timeout and have the child stored proc complete and return an error to the parent stored proc

This doesn't seem to be happening on the production server. The production server is just killing my whole process.

Really appreciate the help

dr
 
Sounds like it's time to start digging through the server configurations and find the difference in the configs.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top