FIX: COM May Not Be Uninitialized for Worker Thread When You Use sp_OA

Article translations Article translations
Article ID: 315395 - View products that this article applies to.
This article was previously published under Q315395
BUG #: 356428 (SHILOH_BUGS)
Expand all | Collapse all

SYMPTOMS

Attempts to call a COM object through the sp_OA stored procedures may fail with error messages that indicate:
  • COM is not initialized or that COM has already been initialized with a different mode (HRESULT 0x80010106)

    -or-

  • The worker thread may stop responding (hang) in OLE32!DllMain when called for DLL_THREAD_DETACH processing as the worker thread exits.
The latter problem may also cause SQL Server to stop responding.

RESOLUTION

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
NOTE: The following hotfix was created before the release of Microsoft SQL Server 2000 Service Pack 3.

The English version of this fix should have the following file attributes or later:
   Version      File name       Description
   ------------------------------------------

   8.00.0474    Sqlservr.exe    SP1-based fix
   8.00.0558    Sqlservr.exe    SP2-based fix
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.

NOTE: If you are using Microsoft Data Engine (MSDE) , there is no Binn\Exe folder; therefore, you can skip the steps about copying the Sqlservr.pdb file.

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 3.

MORE INFORMATION

When you use sp_OA related stored procedures to call COM objects, SQL Server must initialize and uninitialize COM on this worker thread by calling CoInitializeEx and CoUninitialize. The initialization occurs when the first sp_OA call is made in a batch, and the uninitialization should occur at the end of the batch. In some cases, the uninitialization does not occur, and the worker thread remains initialized for COM calls.

Properties

Article ID: 315395 - Last Review: September 27, 2005 - Revision: 5.2
APPLIES TO
  • Microsoft SQL Server 2000 Standard Edition
Keywords: 
kbhotfixserver kbqfe kbsqlserv2000sp3fix kbbug kbfix kbsqlserv2000presp3fix KB315395

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com