Microsoft KB Archive/238442

From BetaArchive Wiki

Article ID: 238442

Article Last Modified on 10/7/2005



APPLIES TO

  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.5



This article was previously published under Q238442

SYMPTOMS

When using Performance Monitor to watch Open Database Connectivity (ODBC) connection pooling statistics, the ODBC Connection Pooling object and all of its counters occasionally disappear from the list of items available in the Add to Chart dialog box.

As another side effect, if an application or service calls the OpenODBCPerfData function in the ODBC Driver Manager (Odbc32.dll), an "Access Denied" error code (c0000022) is returned.

CAUSE

The ODBC Driver Manager is incorrectly passing in a NULL pointer as the Security Descriptor argument when calling CreateMutexA and when creating a memory-mapped file through ODBCCreateFileMapping.

When a security descriptor is a Null pointer, as opposed to a NULL DACL, the default security descriptor is used, which permits access only to the Local System account and the owner.

Therefore, if a service that runs under the System account starts and uses the ODBC Connection Pooling Performance Monitor counters, user-mode applications are denied access to the necessary mutexes and file mapping, and performance counter information is unavailable.

RESOLUTION

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 Data Access Components 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 should have the following file attributes or later:

   Date      Time    Version      Size    File name     Platform
   ------------------------------------------------------------- 
   7/22/99           3.510.4322   194KB   Odbc32.dll
   7/22/99           3.510.4322    86KB   Odbccp32.dll
   7/22/99           3.510.4322    70KB   Odbcint.dll


                



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 corrected in MDAC 2.6.
If you have MDAC 2.1 or 2.5 you can install the following hotfix, or you can upgrade to MDAC 2.6. For the latest version of MDAC, see the following Microsoft Web site:

MORE INFORMATION

IMPORTANT!

Care must be taken to install all files contained in this hotfix.

The ODBC core files perform automatic version checking. If the versions of these files are not consistent, error dialog boxes will be generated indicating that there is a version mismatch. This can cause problems under conditions where these dialog boxes go unanswered, such as on an unattended Web server. Under these circumstances, the system can appear to hang or freeze.

Manual Installation

  1. Close or stop any applications or services that are using ODBC. This may include Internet Information Server (IIS), Microsoft Transaction Server (MTS), SQL Server Replication, Microsoft Office applications, and any ADO, OLE DB, or RDO applications.
  2. Download the hotfix (ODBCPerfCount.exe) into a temporary directory and run it to extract the following files:


    • odbc32.dll
    • odbccp32.dll
    • odbcint.dll
  1. Locate and rename the current version of these files, which should be in the \Winnt\System32 folder for Windows NT computers, and in the \Windows\System folder for Windows 9x computers.
  2. Copy the hotfix version of the hotfix files into the same location, and restart your services and applications.

Important Notice for Microsoft Windows 95/98 Users

If you are installing this fix onto a computer running Windows 95 or a computer with the original release of Windows 98, you may need to install the Windows 98 Migration dynamic-link library (DLL) included with this fix. Please carefully read the Migrate_qfe.txt file that is included with the Migration.exe file, included with the download.

Steps to Reproduce

  1. To enable the performance counters, go to ODBC Administrator in Control Panel and make sure that PerfMon is selected by clicking the Enable under Connection Pooling tab.
  2. Use the Srvany.exe utility to install and register PerfMon.exe as a service. The Srvany.exe utility and instructions on its use are provided in the Windows NT Resource Kit.
  3. Use the Services icon in Control Panel to set the account for Perfmon.exe to be the System account, set the Startup mode to Manual, and select the "Allow Service to Interact With Desktop" check box.
  4. Launch an instance of Performance Monitor by finding Perfmon.exe in the Services icon in Control Panel, then clicking the Start button. This will start in instance of Performance Monitor that runs as the System account.
  5. Add the ODBC Connection Pooling counters to the chart.
  6. Start another instance of Performance Monitor from the Taskbar by clicking Start->Programs->Administrative Tools->Performance Monitor. This instance will run as the currently logged on user.

When you attempt to add the ODBC Connection Pooling counters to the chart, the ODBC Connection Pooling object and all of its counters will be unavailable.


Additional query words: odbc connection pooling object performance monitor perfmon counters disappear service system account access denied c0000022

Keywords: kbbug kbfix kbqfe kbdatabase kbhotfixserver KB238442