Microsoft KB Archive/305147

= FIX: An Access Violation Occurs in CEsExec::ReleaseInterfaces If You Insert NTEXT Column with &quot;Insert - Exec&quot; =

Article ID: 305147

Article Last Modified on 10/17/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q305147



BUG #: 354732 (SHILOH_BUGS)



SYMPTOMS
An Access Violation may occur when you perform an insert into a NTEXT column by using an INSERT-EXEC statement. The error only occurs when the source NTEXT column is of a different collation than the destination NTEXT column.

The SQL Server error log of the servers for SQL Server Service Pack 1 may contain entries similar to the following: --- Short Stack Dump 00000000 Module(sqlservr+FFC00000) 0058758E Module(sqlservr+0018758E) (CEsExec::ReleaseInterfaces+0000001E) 005BA590 Module(sqlservr+001BA590) (ReleasePunks+00000021) 0041970E Module(sqlservr+0001970E) (CEs::GeneralEval4+00000059) --- 2001-07-03 11:52:59.53 spid51   clean_tables_xact: active sdes for tabid 501576825 2001-07-03 11:52:59.54 spid51   Process 51 unlocking unowned resource: RID: 7:1:96:0

Prior to Service Pack 1 the entries may be similar to the following:

--- Short Stack Dump 00000000 Module(sqlservr+FFC00000) 005D2425 Module(sqlservr+001D2425) (CEsExec::ReleaseInterfaces(void)+0000001E) 005FBDC3 Module(sqlservr+001FBDC3) (ReleasePunks(class CEsExec *,class CXVariant *)+00000021) 00416540 Module(sqlservr+00016540) (CEs::GeneralEval4(unsigned long *,class CEsExec *,class CXVariant *)+00000059) 410717FF Module(UMS+000017FF) (UmsScheduler::Suspend(unsigned long,int)+0000007E) 41071918 Module(UMS+00001918) (UmsEvent::Wait(unsigned long,int,int)+00000095) 41073513 Module(UMS+00003513) (ProcessWorkRequests(class UmsWorkQueue *)+000000F0) 4107382C Module(UMS+0000382C) (ThreadStartRoutine(void *)+000000BC) 7800A27B Module(MSVCRT+0000A27B) (__unDNameEx+0000484C) 77E8758A Module(KERNEL32+0000758A) (MapViewOfFileEx+00000050) --- 2001-10-26 08:24:55.32 spid61   clean_tables_xact: active sdes for tabid 19770580792001-10-26 08:24:55.32 spid61    Process 61 unlocking unowned resource: RID: 7:1:79:0 2001-10-26 08:24:55.32 spid61   Error: 1203, Severity: 20, State: 1 2001-10-26 08:24:55.32 spid61   Process ID 61 attempting to unlock unowned resource RID: 7:1:79:0.. an error message similar to the following may be returned to the client

ODBC: Msg 0, Level 19, State 1 SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. Server: Msg 1203, Level 20, State 1, Line 1 Process ID 51 attempting to unlock unowned resource RID: 9:1:97:0. Connection Broken



RESOLUTION
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



WORKAROUND
To work around this problem:
 * Do not use an EXEC statement in the INSERT. -or-


 * Change the collation of the source and destination columns to be the same. You cannot change the collation of a NTEXT column by using an ALTER TABLE statement. To change the collation of a column, you must re-create the parent table with the proper collate setting for each column.



STATUS
Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.



MORE INFORMATION
You can set the collation either on the column level with a CREATE or an ALTER TABLE operation by using the COLLATE option, or at the database level with a CREATE or ALTER DATABASE operation.

To determine the collation of a column execute the following in Query Analyzer: SELECT SQL_VARIANT_PROPERTY('textcol', 'collation') FROM MyTable To determine the collation of a database execute this code: SELECT DATABASEPROPERTYEX('Northwind', 'Collation')