Error 1203 and Stored Procs from Triggers

Error 1203 and Stored Procs from Triggers

Post by Bryn Rhode » Sun, 27 Jul 1997 04:00:00


I am working on a large Integrated accounting package using SQL Server as
the back end.  One of the required tables is a checkbook which must be able
to handle hundreds of thousands of records, and maintain a running balance.
 We decided to implement this using a field in the table which is
maintained with triggers.  The insert finds the last check and calculates
the new balance by updating the table.  The update trigger finds every
check that would be affected by the new balance change and updates from
there.  The delete does the same as the update.  We use stored procedures
called from the triggers to avoid duplication of code, and to allow the
whole table to be updated at once.  The stored procedures by themselves
work fine, but when we call them from the triggers we get Error 1203.
Caller of lock manager is incorrectly trying to unlock an unlocked object.
This error keeps happening until the server gets a stack overflow and SQL
terminates.  Needless to say this is not a good thing.  The help on this
error says run the DBCC CheckTable and CheckDB, but these have reported
nothing out of the ordinary.  We moved just these tables and triggers into
a separate database with no luck.  The table by itself behaves normally as
do the stored procedures.  No end in sight on this one.  Anything anyone
can think of would be greatly appreciated.



Error 1203 and Stored Procs from Triggers

Post by Neil Pik » Tue, 29 Jul 1997 04:00:00


 This is a bug in SQL Server.  What release and SP are you running, as there
have been plenty of bug fixes in the 6.5 servicepacks - SP3 is the latest of
these.  You'll need to raise a fault with MS PSS to get it resolved unless you
can post a short reproduction script with all object definitions and data
required to re-create it on a clean SQL system.

 Neil Pike MVP/MCSE
 Protech Computing Ltd (MS Solution Provider)
 Using Virtual Access 4.01 build 232 (32-bit) on NT 4.0 SP3


1. Error 1203 when calling stored procedure through ODBC.

Whenever I execute the SP from my vb4 16bit code I get the error


Caller of lock manager is incorrectly trying to unlock an unlocked

object. spid = etc.....

yet if I call the same SP from ISQLW using exactly the same parameters

it works fine. The SP calls other stored procedures and uses cursors

(some nested). Some of the cursors update the table the cursor is based

on. I am using SQL server 6.0

The SP is quite involved, but it is fully debugged and does exactly what

I expect it to, but it will only run correctly when called directly from

ISQLW. As soon as I try and call it from my VB4 application (using ODBC

SqlExecDirect) I get the above problem.

Can anyone help?

2. nested stored procedures

3. 1203 error w/no dbcc checkdb errors

4. US-NJ: Whitehouse-Oracle/Shell Programmer Analyst

5. Stored Procs, Triggers, and Errors

6. Using SQL 7.0 how can I eliminate suppress duplicate

7. error 1203 causing the server to do down

8. SQL 7.0 Search Service under W2K Pro

9. Error 1203

10. SQL Server 1203 errors

11. Error 1203

12. ERROR FATAL 1203

13. Error 1203