FIX: Cross Database Query Fails with Error 3624 and an Assertion Occurs in the Dbtable.cpp File (330307)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q330307
BUG #: 362593 (Shiloh_bugs)

SYMPTOMS

If you run a cross-database query, a retail assertion may occur and the statement may not run. If you run a cross-database query in SQL Query Analyzer, the query fails, and you may receive the following error message:

Server: Msg 3624, Level 20, State 1, Line 1

Location: dbtable.cpp:2608
Expression: status
SPID: 51
Process ID: 2068

Connection Broken
You may see the following short stack in the SQL Server error log:
* Short Stack Dump
* 0085CF85 Module(sqlservr+0045CF85) (CStackDump::GetContextAndDump+0000002E Line 1855+00000000)
* 0085EB58 Module(sqlservr+0045EB58) (stackTrace+00000216 Line 4139+00000000)
* 00919D41 Module(sqlservr+00519D41) (utassert_fail+000002E3 Line 452+00000010)
* 007F0D41 Module(sqlservr+003F0D41) (DBLockCache::ReleaseDBLock+000000C6 Line 2608+0000001B)
* 007F0ED9 Module(sqlservr+003F0ED9) (unlockdb+00000024 Line 2781+00000000)
* 0084C2CA Module(sqlservr+0044C2CA) (XdesRMReadOnly::~XdesRMReadOnly+00000075 Line 8233+0000000A)
* 0083F0C5 Module(sqlservr+0043F0C5) (ReadOnlyXactImp::Rollback+0000009B Line 853+0000000C)
* 0083EF94 Module(sqlservr+0043EF94) (ReadOnlyXactImp::Commit+00000030 Line 778+00000007)
* 004D3E68 Module(sqlservr+000D3E68) (CMsqlReadOnlyXact::Commit+0000000F Line 2719+00000000)
* 004D2C2B Module(sqlservr+000D2C2B) (CMsqlXact::Commit+0000009E Line 670+00000000)
* 004D3B16 Module(sqlservr+000D3B16) (CAutoMsqlXact::CommitNestedXact+00000062 Line 2154+00000000)
* 0048AACA Module(sqlservr+0008AACA) (CProchdr::FCompile+000011B6 Line 1300+00000000)
* 004A3C73 Module(sqlservr+000A3C73) (CSQLSource::FTransform+0000034C Line 885+00000012)
* 004A4AE8 Module(sqlservr+000A4AE8) (CSQLStrings::FTransform+000001A1 Line 1644+0000000A)
* 004A41D9 Module(sqlservr+000A41D9) (CSQLSource::Execute+0000015B Line 1136+0000000B)
* 0053A208 Module(sqlservr+0013A208) (language_exec+000003E1 Line 690+00000000)
* 0053B0B1 Module(sqlservr+0013B0B1) (process_commands+000000EC Line 1711+00000006)
* 41073379 Module(ums+00003379) (ProcessWorkRequests+0000024A)
* 41073071 Module(ums+00003071) (ThreadStartRoutine+000000BD)
* 7800C9EB Module(MSVCRT+0000C9EB) (beginthread+000000CE)
* 77E887DD Module(KERNEL32+000087DD) (GetModuleFileNameA+000001D1)
* -------------------------------------------------------------------------------
2002-10-17 11:23:26.49 spid51    SQL Server Assertion: File: <dbtable.cpp>, line=2608 
Failed Assertion = 'status'.
				
When SQL Server tries to clean up the connection that caused the original assertion, the error is followed by various exceptions and symptom dumps.

CAUSE

To improve performance and avoid excessive locking operations, SQL Server 2000 caches database locks for each connection. The cache size for storing database locks is fixed. If a cross-database query holds several database locks, the additional database locks are not cached. However, in some cases, when the cache is available, the database locks that are not cached in the first place can be put back in the cache again. That is what causes the retail assertion to occur.

RESOLUTION

Note The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 3.

To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft SQL Server 2000 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version        Size             File name
   ----------------------------------------------------------------
   08-Oct-2002  10:14  2000.80.690.0  7,467,089 bytes  Sqlservr.exe 
Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

This problem was first corrected in SQL Server 2000 Service Pack 3.

REFERENCES

For more information about SQL Server database locks and blocking, visit the following Microsoft Web site:
http://msdn.microsoft.com/library/en-us/optimsql/odp_tun_1a_4uav.asp

Modification Type:MinorLast Reviewed:10/11/2005
Keywords:kbHotfixServer kbQFE kbSQLServ2000sp3fix kberrmsg kbDatabase kbSqlClient kbbug kbfix KB330307 kbAudDeveloper