Microsoft KB Archive/910414

= FIX: You may receive an error message when you try to load data by using CLR functions in a Transact-SQL job in SQL Server 2005 =

Article ID: 910414

Article Last Modified on 7/26/2006

-

APPLIES TO


 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems
 * Microsoft SQL Server 2005 Enterprise X64 Edition
 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Standard X64 Edition
 * Microsoft SQL Server 2005 Workgroup Edition

-



Bug #: 412358 (SQLBUDT)

Bug #: 406946 (SQLBUDT)



SUMMARY
This article describes the following about this hotfix release:
 * The issues that are fixed by this hotfix package.
 * The prerequisites for installing the hotfix package.
 * Information about whether you must restart the computer after you apply the hotfix package.
 * Information about whether the hotfix package is replaced by any other hotfix package.
 * Information about whether you must make any registry changes.
 * The files that are contained in the hotfix package.



SYMPTOMS
Consider the following scenario. In Microsoft SQL Server 2005, you try to use common language runtime (CLR) functions to load data. You do this by running a Transact-SQL job. This Transact-SQL job is started by SQL Server Agent. In this scenario, the job fails, and you receive the following error message:

Error 563. ETL Load: Error Number 6535, Severity 16, State {2), In Routine, At Line 25, Full Message : .NET Framework execution was aborted. Another query caused the AppDomain framework.dbo[runtime].2 to be unloaded or an unhandled .NET exception happened. 54

Additionally, the following messages are written to the SQL Server error log:

spid1s AppDomain 2 (framework.dbo[runtime].1) doomed due to memory pressure.

spid1s AppDomain 2 (framework.dbo[runtime].1) unloaded.

Logon Error: 17830, Severity: 20, State: 2.

Logon A network error occurred while establishing a connection; the connection has been closed. This may have been caused by client or server login timeout expiration. Time spent during login: total 26 ms, enqueued 1 ms, network writes 1 ms, network reads 25 ms, establishing SSL 25 ms, negotiating SSPI 0 ms, validating login 0 ms. [CLIENT: 10.218.40.134]

spid83 AppDomain 3 (framework.dbo[runtime].2) created.



CAUSE
This problem occurs because CLR parallel threads are incorrectly shut down when you run parallel queries. Typically, this problem occurs when the following conditions are true:
 * A correct shutdown occurs in the main thread, and subthreads have not exited. In this scenario, the subthreads will stop the main thread, and the CLR thread is ended.
 * An exception is not managed when you try to enter an aborted CLR thread, and you are stopped on the stub.



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

913089 How to obtain the latest service pack for SQL Server 2005

Prerequisites
You must have SQL Server 2005 installed to apply this hotfix.

Restart information
You do not have to restart the computer after you apply this hotfix.

Hotfix file information
This hotfix contains only those files that are required to correct the issues that this article lists. This hotfix may not contain all the files that you must have to fully update a product to the latest build.

The English version of this hotfix has the file attributes (or later file attributes) 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.

SQL Server 2005, IA 64-bit version
Note Because of file dependencies, the most recent hotfix that contains these files may also contain additional files.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was first corrected in Microsoft SQL Server 2005 Service Pack 1.



MORE INFORMATION
For more information about the naming schema for Microsoft SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:

822499 New naming schema for Microsoft SQL Server software update packages

For more information about the terminology that Microsoft uses when Microsoft corrects software after the software is released, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Keywords: kbsql2005sp1fix kbsql2005clr kbsql2005presp1fix kbsql2005tsql kbbug kbfix kbpubtypekc kbhotfixserver kbqfe KB910414

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.