FIX: Query with SET NO_BROWSETABLE Option Set ON May Generate Access Violation (302664)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)
  • Microsoft SQL Server 7.0 Service Pack 2
  • Microsoft SQL Server 7.0 Service Pack 3

This article was previously published under Q302664
BUG #: 352954 (SHILOH_BUGS)
BUG #: 101337 (SQLBUG_70)

SYMPTOMS

When you execute an INSERT, DELETE or UPDATE query that operates on objects with underlying triggers, the query may terminate with the following error message and an Access Violation occurs:
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
The Access Violation may occur when the following conditions are true:
  • The table has underlying triggers for the INSERT, UPDATE or DELETE.
  • The trigger queries the inserted or deleted trigger tables.
  • The NO_BROWSETABLE option is set ON.
The following stack dump appears in the SQL Server 7.0 error log:
---------------------------------------------------------------------
Short Stack Dump 
0x0041012f Module(sqlservr+1012f) (FHasObjPermissions+37)  
0x005c4e7f Module(sqlservr+1c4e7f) (CBrowseTablePerms::FSchemaChanged+66) 
0x005c5094 Module(sqlservr+1c5094) (CBrowseMode::FSchemaChanged+20) 
0x0053a072 Module(sqlservr+13a072) (CStmtSelect::XretExecute+9b)
0x0040fd90 Module(sqlservr+fd90) (CMsqlExecContext::ExecuteStmts+11b) 
0x0040f7d0 Module(sqlservr+f7d0) (CMsqlExecContext::Execute+16b) 
---------------------------------------------------------------------  
					

The following stack dump appears in the SQL Server 2000 error log:
----------------------------------------------------------------------
Short Stack Dump
004181A1 Module(sqlservr+000181A1) (FHasObjPermissions+00000050)    
0056BD62 Module(sqlservr+0016BD62) (CBrowseTablePerms::FSchemaChanged+00000059)                                                                                                                                                                                 
0056BFC2 Module(sqlservr+0016BFC2) (CBrowseMode::FSchemaChanged+00000020)                                                                                                         
005F6F05 Module(sqlservr+001F6F05) (CStmtSelect::XretExecute+000000C2)                                                                                                                
00413CEE Module(sqlservr+00013CEE) (CMsqlExecContext::ExecuteStmts+000002D2)                                                                                                                                                                                    
004133E9 Module(sqlservr+000133E9) (CMsqlExecContext::Execute+000001B6)                                                                                                                                                                                         
00412918 Module(sqlservr+00012918) (CSQLSource::Execute+00000331)                                                                                                                                                                                               
005F663D Module(sqlservr+001F663D) (ExecTrigger+000000C9)                                                                                                                                                                                                       
005F6824 Module(sqlservr+001F6824) (ExecAfterTrigs+0000019D)                                                                                                                                                                                                    
005F6922 Module(sqlservr+001F6922) (ExecAfterTrigsIfAny+0000007A)                                                                                                                                                                                               
0041A5ED Module(sqlservr+0001A5ED) (CStmtDML::XretExecuteNormal+0000052A)                                                                                                                                                                                       
0041A346 Module(sqlservr+0001A346) (CStmtDML::XretExecute+0000001C)                                                                                                                                                                                             
00413CEE Module(sqlservr+00013CEE) (CMsqlExecContext::ExecuteStmts+000002D2)                                                                                                                                                                                    
004133E9 Module(sqlservr+000133E9) (CMsqlExecContext::Execute+000001B6)                                                                                                                                                                                         
00412918 Module(sqlservr+00012918) (CSQLSource::Execute+00000331)                                                                                                                                                                                               
0044AFA7 Module(sqlservr+0004AFA7) (CStmtPrepQuery::XretExecute+00000200)                                                                                                                                                                                       
00413CEE Module(sqlservr+00013CEE) (CMsqlExecContext::ExecuteStmts+000002D2)                                                                                                                                                                                    
004133E9 Module(sqlservr+000133E9) (CMsqlExecContext::Execute+000001B6)                                                                                                                                                                                         
00412918 Module(sqlservr+00012918) (CSQLSource::Execute+00000331)                                                                                                                                                                                               
00448916 Module(sqlservr+00048916) (language_exec+000003E1)                                                                                                                                                                                                     
00411D4C Module(sqlservr+00011D4C) (process_commands+000000E0 Line 712+00000002)                                                                                                                                                                                
41073379 Module(UMS+00003379) (ProcessWorkRequests+0000024A)                                                                                                                                                                                                    
41073071 Module(UMS+00003071) (ThreadStartRoutine+000000BD)                                                                                                                                                                                                     
7800A27B Module(MSVCRT+0000A27B) (_unDNameEx+0000484C)                                                                                                                                                                                                          
77E8758A Module(KERNEL32+0000758A) (FileTimeToSystemTime+0000012F)          

----------------------------------------------------------------------
					

RESOLUTION

SQL Server 2000

To resolve this problem, obtain the latest service pack for Microsoft 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

SQL Server 7.0

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

301511 INF: How to Obtain the Latest SQL Server 7.0 Service Pack

WORKAROUND

To work around this problem you can either:
  • Modify the triggers so the triggers do not query the inserted or deleted trigger tables. -or-

  • In situations where you can change the SET NO_BROWSETABLE option, set SET NO_BROWSETABLE to OFF before you execute the INSERT, DELETE or UPDATE query statements.

STATUS

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

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

SQL Server 7.0
This problem was first corrected in Microsoft SQL Server 7.0 Service Pack 4.

MORE INFORMATION

Some client applications automatically set the NO_BROWSETABLE option. For example, Microsoft Access sets the NO_BROWSETABLE option for results processing.

Modification Type:MajorLast Reviewed:6/28/2004
Keywords:kbbug kbfix KB302664