SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘dynamic link library’

SQL Server 7.0 Acmsetup.exe setup application fails

Symptoms
When the Configuring Server portion of a SQL Server 7.0 installation is in progress, this series of error messages may appear:

{acmsetup.EXE – Application Error
The application failed to initialize properly (0xc0000006).Click on OK to terminate the application.}Followed by:

sqlservr.exe – Unable To Locate DLL
The dynamic link library MSWSTR10.DLL could not be found in the specified path:
d:\MSSQL7\binn;C:\WINNT;C:\WINNT\system32Followed by:

Setup
Setup failed to configure the server.Refer to the server error logs and cnfgsvr.out for more information.If you run just the Mdac_typ.exe executable file that is located in the x86\Other folder of the SQL Server 7.0 CD, you may see:This error message:

acmsetup.EXE – Application Error
The application failed to initialize properly (0xc0000006).Click on OK to terminate the application.An entry similar to this in the Cnfgsvr.out file:

Starting Service…An error occurred while attempting to start the service (1053)SQL Server Configuration failed. An entry similar to this in the Sqlstp.log file:

08:56:46 Path successfully updated. 08:56:46 %SystemRoot%\system32;%SystemRoot%;D:\MSSQL7\BINN 08:56:46 D:\MSSQL7\binn\cnfgsvr.exe-Silent 2 -NoSampleDB 0 -SQLPath”D:\MSSQL7\” -SQLDataPath “E:\MSSQL7\” -SortID 52 -LCIDCompStyle “1033-196609″ -HWND 27001094 -User sa -Pwd 08:58:58 Process Exit Code: (-1)08:59:00 Setup failed to configure the server.Refer to the server error logs and cnfgsvr.out for more information. 08:59:00 Action CleanUpInstall: 08:59:00 C:\TEMP\_ISTMP10.DIR\scm.exe-Silent 1 -Action 4 -Service SQLServerAgent 08:59:00 Process Exit Code: (1060) The specified service does not exist as an installed service. 08:59:00 C:\TEMP\_ISTMP10.DIR\scm.exe-Silent 1 -Action 4 -Service MSSQLServer 08:59:05 Process Exit Code: (0)08:59:05 Installation Failed.
Resolution
An 0xc000006 exception error occurs when the system attempts to retrieve a swapped-out page and fails.

FIX: Error messages after SQL Server 2005 or SQL Server 2000 has been running for some time on Windows Server 2003 or on Windows 2000: “Failed to load FileName.dll” and “Attempts to load any type …

Symptoms
When you run Microsoft SQL Server 2005 or Microsoft SQL Server 2000 on a Windows Server 2003-based computer or on a Windows 2000-based computer, you may receive an error message that contains the following error messages:

Failed to load FileName.dll

Attempts to load any type of dll might fail within the SQL Server process with errors pointing to LoadLibrary failure.This problem usually occurs after SQL Server has been running for some time.
The complete error message that you receive resembles the following:

Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: The read on the database failed. Reason: Failed to load Msxmlsql.dll.
Data: System.Collections.ListDictionaryI,4092,NULL,NULL,2007-04-13 09:44:11.640,DB\SQLServer5,warning,2007-04-13 09:44:13.153,
The activated proc [dbo].[sp_sysmail_activate] running on queue msdb.dbo.ExternalMailQueue output the following:’The service queue “ExternalMailQueue” is currently disabled.’
Attempts to use XML related activity in TSQL fails.
Msg 6610, Level 16, State 1, Procedure sp_xml_preparedocument, Line 1
Failed to load Msxmlsql.dll.
Msg 6607, Level 16, State 3, Procedure
sp_xml_removedocument, Line 1sp_xml_removedocument: The value supplied for parameter number 1 is invalid.
Attempts to load any type of dll might fail within the SQL Server process with errors pointing to LoadLibrary failure.
Attempts to use extended stored procedures will result in
Msg 0, Level 16, State 0, Procedure xp_ss_backup, Line 1
Cannot load the DLL C:\Program Files\Microsoft SQL Server\MSSQL\Binn\SQLsafe_ExtendedStoredProc.dll, or one of the DLLs it references. Reason: 1114(A dynamic link library (DLL) initialization routine failed.).
Error: 18210, Severity: 16, State: 1.
BackupVirtualDeviceSet::Initialize: CoCreateInstance failure on backup device ‘d4630f27-03a1-47ae-b7a7-4813a6809908′. Operating system error 0×8007045a(A dynamic link library (DLL) initialization routine failed.).
Resolution
This problem occurs because no thread local storage (TLS) slot is available for the SQL Server process (Sqlservr.exe). This is a problem in Windows Server 2003 and in Windows 2000.
When SQL Server unloads a DLL, the TLS slots that the DLL uses may not be released because of a problem in the TlsFree function. If SQL Server frequently loads various DLLs, and then unloads these DLLs, these DLLs use up all the available TLS slots. Eventually, SQL Server can no longer load a DLL that requires TLS slots.

BUG: Hang or Application Error in Setup (VS60wiz.exe)

Symptoms
When install one of the Visual Studio products listed at the top of this article, the following error messages might appear:

Application Error in VS60wiz.exe
The ordinal 2 could not be found in the dynamic link library oraspawn.dll.
-or-

Application Error in VS60wiz.exe.
-or-

The ordinal 2 could not be found in the dynamic link library oraspawn.dll.
-or-

Process has already been executed. Generated error will be closed by windows. Needs to restart program. An error log has been generated.NOTE: that the actual exception and location listed depends on the system.
The workaround described in the “Resolution” section of this article is also likely to resolve problems in which Setup stops responding.
None of the information in this article applies to failures that occurlater in Setup, after ACMSETUP has started.
Resolution
One possible cause is an exception triggered by a performance counter DLL.