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 for January, 2011

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.

SQL Server 2000 hotfix update for SQL Server 2000 Service Pack 3 and 3a

Symptoms
SummaryMore informationPrerequisitesHow to identify your SQL Server service pack and version SQL Server 2000 baseline buildsHotfix update information
Resolution
This article contains a list of the Microsoft SQL Server 2000 hotfixes. You can use this list to determine which hotfixes are included in a specific hotfix build. Unless otherwise specified, all the hotfixes in prior builds will be included in later builds. The list includes all the public hotfixes that have been released since the release of Microsoft SQL Server 2000 Service Pack 3 and Microsoft SQL Server 2000 Service Pack 3a.
Here are some important notes regarding the Microsoft SQL Server 2000 hotfixes. For all the hotfixes, you must have SQL Server 2000 Service Pack 3 or SQL Server 2000 Service Pack 3a installed.For hotfixes earlier than build 8.00.0818, we recommend that you apply build 8.00.0818 instead. Build 8.00.0818 contains security fixes that are documented in Microsoft Security Bulletin MS03-031. For download locations and additional information about the security vulnerability addressed in MS03-031, visit the following Microsoft Web site:
http://www.microsoft.com/technet/security/bulletin/MS03-031.mspx(http://www.microsoft.com/technet/security/bulletin/MS03-031.mspx)Hotfixes that are not part of a security release can only be obtained by contacting Microsoft Product Support Services. For a complete list of Microsoft Product Support Services telephone phone numbers and for information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)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 usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. To install any hotfix later than build 8.00.0977, you must first install the 8.00.0977 “baseline” build. For more information about “baseline” builds, see the “SQL Server 2000 baseline builds” section. This list does not contain the fixes for Microsoft Data Access Components (MDAC) or forMicrosoft SQL Server 2000 Analysis Services.

PRB: Error message: “Exception Access Violation 2147221499.Need to run the object to perform this operation” occurs when you run a DTS package in Microsoft Visual Basic code

Symptoms
This article describes one possible reason as to why a Data Transformation Services (DTS) package created in Microsoft Visual Basic code may fail with an access violation (AV) error message.
When you create a DTS package by using the WITHEVENTS keyword, and you then run the DTS package from within Microsoft Visual Basic code, the package fails with an access violation and the following error message occurs:

Microsoft dts package provider generated code execution exception;
exception access violation 2147221499.Need to run the object to
perform this operation.
Resolution
The following five events are associated with a DTS package when the DTS package is created by using the WITHEVENTS clause:

Private Sub <object>_OnError(ByVal EventSource As String, _ByVal ErrorCode As Long, _ByVal Source As String, _ByVal Description As String, _ByVal HelpFile As String, _ByVal HelpContext As Long, _ByVal IDofInterfaceWithError As String, _ByRef pbCancel As Boolean)Private Sub <object>_OnFinish(ByVal EventSource As String)Private Sub <object>_OnProgress(ByVal EventSource As String, _ByVal ProgressDescription As String, _ByVal PercentComplete As Long, _ByVal ProgressCountLow As Long, _ByVal ProgressCountHigh As Long)Private Sub <object>_OnQueryCancel(ByVal EventSource As String, _ByRef pbCancel As Boolean)Private Sub <object>_OnStart(ByVal EventSource As String)If code for these events is not present, the error message described in the “Symptoms” section occurs.
For more information about these events, please see the following article in the Microsoft Knowledge Base:
221193?(http://support.microsoft.com/kb/221193/) How to install Data Transformation Services (DTS) event handlers in Visual Basic

PRB: A Timeout Occurs When a Database Is Automatically Expanding

Symptoms
You may experience the following symptoms in SQL Server:A database does not expand automatically although you have the autogrow option on.The Errorlog file does not contain any messages that indicate that the database is full.Client computers that try to modify data in this database receive a “Timeout Expired” message on their user transaction.SQL Profiler displays an “Attention” event on a connection, and, if the computer is running SQL Server 7.0, SQL Profiler also displays an “Exception 822″ error.NOTE: The “Timeout Expired” message is a generic message that you may receive in other situations.
You may notice these symptoms when:You run SQL Profiler for a long time, you capture the Exception event and the IntegerData column, and then you look for an occurrence of the “Exception 822″ error.
-Or-You use the -y822 parameter to start SQL Server. After the database does not automatically expand, you check the Errorlog file for a stack dump because of the “Exception 822″ error.NOTE: The database file may automatically expand, but the timeout occurs when the file is being initialized for use, which must occur for the database to be useful.
Resolution
When a connection issues a Data Modification Lanaguage (DML) statement that requires additional space in a database, SQL Server tries to automatically expand the database, if you have the autogrow option set. The client that issued the statement may time out while the database is expanding, depending on the query timeout value that is configured on the client side. Several applications use a default timeout value of 30 seconds. This timeout ends the client connection and the automatic expansion of the database that it prompted.

On a computer that has a 64-bit processor, you receive an error message in SQL Server Management Studio when you connect to SQL Server 2005 Integration Services or when you create or edit a maint …

Symptoms
You install a Microsoft SQL Server 2005 hotfixpackage on a computer that has a 64-bit processor. When youconnect to SQL Server 2005 Integration Services (SSIS) by using SQL Server Management Studio, you receive an error message that resembles the following:

TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
Connect to SSIS Service on machine “ComputerName” failed:
Error loading type library/DLL.Additionally, when you try to create or to edit a maintenance plan, you receive one of the following error messages:
Error message 1

Exception from HRESULT: 0xC0010014 (Microsoft.SqlServer.DTSRuntimeWrap)
Program Location:
at Microsoft.SqlServer.Dts.Runtime.ConnectionManager.get_Properties()
at Microsoft.SqlServer.Management.DatabaseMaintenance.TaskContextUI.InitializeConnectionCombo(String connectionName)
at Microsoft.SqlServer.Management.DatabaseMaintenance.DBMaintTaskBackupForm.SetTask(DbMaintenanceBackupTask task)
at Microsoft.SqlServer.Management.DatabaseMaintenance.DBMaintTaskBackupForm..ctor(TaskHost taskHost, IServiceProvider provider)
at Microsoft.SqlServer.Management.DatabaseMaintenance.DbMaintTaskBackupUI.GetView()at Microsoft.DataTransformationServices.Design.DtrTaskDesigner.GetTaskEditor()
Error message 2

Exception from HRESULT: 0xC0010014 (Microsoft.SqlServer.DTSRuntimeWrap)
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Sequence.get_Properties()
at Microsoft.DataTransformationServices.Design.DtsBaseDesigner.PreFilterProperties(IDictionary properties)
at Microsoft.DataTransformationServices.Design.DtsPropExpressionsDesigner.PreFilterProperties(IDictionary properties)
at Microsoft.DataTransformationServices.Design.DbMaintSequenceDesigner.PreFilterProperties(IDictionary properties)
at System.ComponentModel.Design.ComponentDesigner.System.ComponentModel.Design.IDesignerFilter.PreFilterProperties(IDictionary properties)
at System.ComponentModel.Design.TypeDescriptorFilterService.System.ComponentModel.Design.ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
at Microsoft.DataTransformationServices.Design.DtsTypeDescriptorFilterService.System.ComponentModel.Design.ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
at System.ComponentModel.TypeDescriptor.PipelineFilter(Int32 pipelineType, ICollection members, Object instance, IDictionary cache)
at System.ComponentModel.TypeDescriptor.GetPropertiesImpl(Object component, Attribute[] attributes, Boolean noCustomTypeDesc, Boolean noAttributes)
at System.ComponentModel.TypeDescriptor.GetProperties(Object component)
at Microsoft.DataWarehouse.Design.Cud.VsTransaction.ChangeProperty(Object obj, String propertyName)
at Microsoft.DataTransformationServices.Design.DtsBasePackageDesigner.CreateExecutable(String moniker, IDTSSequence container, String name)This problem occurs if one of the following conditions is true:The SQL Server 2005 Integration Services hotfix package is installed. However, the SQL Server 2005 Tools hotfix package is not installed.You install the SQL Server 2005 Tools hotfix package before you install the SQL Server 2005 Integration Services hotfix package.You are running two instances of SQL Server 2005 on the computer. Additionally, the versions of both instances of SQL Server are earlier versions than Microsoft SQL Server 2005 Service Pack 2 (SP2).The computer is running an instance of SQL Server 2005 with SP2. Additionally, you install a post-SP2 hotfix on this instance. Then you install a second instance of SQL Server 2005. On the second instance, you install SQL Server 2005 SP2.
Resolution
This problem occurs because the installer unregisters the 32-bit Dts.dll file when the installer installs the 64-bit Dts.dll file. The 64-bit Dts.dll file is installed together with SQL Server 2005 SP2. Additionally,the 64-bit Dts.dll file may be installed together with any SSIS hotfix package that contains the 64-bit Dts.dll file.

Issues that you may encounter when you install a named instance of one or more SQL Server 2005 components and you specify different installation locations for one or more of the components

Symptoms
Consider the following scenario:You install a named instance of one or more of the following Microsoft SQL Server 2005 components:SQL Server Database ServicesSQL Server Analysis ServicesOn the “Components to Install” page, you specify different installation locations for one or more of the components as follows:You specify that Database Services is to be installed in a folder that is named “MSSQLServer.”You specify that Analysis Services is to be installed in a folder that is named “MSSQLServerOLAPService.”Note The names of these folders are case sensitive.In this scenario, you may encounter the following symptoms.
Symptom 1Specific .ini files for the components that are mentioned earlier contain information as follows:If you install Database Services, information that resembles the following is contained in the Perf-InstanceNamesqlctr.ini file:
[info]
drivername=MSSQL$InstanceName
trusted=
symbolfile=Drive:\MSSQL$InstanceName\MSSQL.X\MSSQL\Binn\sqlctr.hIf you install Analysis Services, information that resembles the following is contained in the Perf-InstanceNamemsmdctr.ini file:
[info]
drivername=MSOLAP$InstanceName
symbolfile=Drive:\MSOLAP$InstanceName\MSSQL.X\OLAP\bin\msmdctr.h
Symptom 2During the installation of SQL Server 2005, you receive the following error message:

The setup has encountered an unexpected error while installing performance counters. The error is: The specified driver is invalid.
Symptom 3After you click Ignore when you receive the error message that is mentioned in Symptom 2, SQL Server Setup finishes its operation successfully. However, the following error message is logged in the SQLSetup0001_ComputerName_SQL.log file:

Error Code: 2001
MSI (s) (44!C4) [Time]: Product: Microsoft SQL Server 2005 — Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The specified driver is invalid.
Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The specified driver is invalid.
<Failure Type=’Ignored’>
Symptom 4If you install SQL Server 2005 Service Pack 1 (SP1) or SQL Server 2005 Service Pack 2 (SP2) afterward, you experience the following issues.SQL Server 2005 SP1When you install SQL Server 2005 SP1, you receive the following error message:

A recently applied update, KB913090, failed to install.The followingerror message is logged in the SQL9_Hotfix_KB913090.log file:

Date and Time Failed to read registry key: Debug
Date and Time MSP returned 1603: A fatal error occurred during installation.
Date and Time Successfully opened registry key: Software\Policies\Microsoft\Windows\Installer
Date and Time Failed to read registry key: Debug
Date and Time Unable to install MSP file: \\ComputerName\f$\64b4ce0abc66d8453d93b0a1fa\HotFixSQL\Files\sqlrun_sql.msp
Date and Time The following exception occurred: Unable to install Windows Installer MSP file Date and Time File: \depot\sqlvault\setupmain\setup\sqlse\sqlsedll\copyengine.cpp Line: 856The following error message is logged in the SQL9_Hotfix_KB913090_sqlrun_sql.msp.log file:

MSI (s) (C8:A0) [11:15:21:752]: Product: Microsoft SQL Server 2005 – Update ‘Service Pack 1 for SQL Server Database Services 2005 ENU (KB913090)’ could not be installed. Error code 1603. Additional information is available in the log file C:\WINDOWS\Hotfix\SQL9\Logs\SQL9_Hotfix_KB913090_sqlrun_sql.msp.log.
MSI (s) (C8:A0) [Time]: Note: 1: 1729
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Transforming table Error.
MSI (s) (C8:A0) [Time]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C8:A0) [Time]: Product: Microsoft SQL Server 2005 — Configuration failed.
MSI (s) (C8:A0) [Time]: Attempting to delete file C:\WINDOWS\Installer\46000.msp
MSI (s) (C8:A0) [Time]: Unable to delete the file. LastError = 32MSI (s) (C8:A0) [11:15:21:922]: Cleaning up uninstalled install packages, if any exist
MSI (s) (C8:A0) [Time]: MainEngineThread is returning 1603
MSI (s) (C8:F8) [Time]: Destroying RemoteAPI object.
MSI (s) (C8:98) [Time]: Custom Action Manager thread ending.
=== Logging stopped: Date and Time ===
MSI (c) (D8:04) [Time]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.Counter after decrement: -1
MSI (c) (D8:04) [Time]: MainEngineThread is returning 1603
=== Verbose logging stopped: Date and Time ===SQL Server 2005 SP2When you install SQL Server 2005 SP2, you receive the following error message:

A recently applied update, KB921896, failed to install.Then, you continue the installation. Finally, Database Services and Analysis Services are not installed.The following error message is logged in the Summary.txt file:

Product: Database Services (SQL2005)
Product Version (Previous): 1399
Product Version (Final):
Status: Failure
Log File: C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Error Number: 29528
Error Description: MSP Error: 29528The setup has encountered an unexpected error while Installing performance counters. The error is: The specified driver is invalid.The following information is logged in the Hotfix.log file:

Date and Time Installing file: sqlrun_sql.msp
Date and Time Copy Engine: Creating MSP install log file at: C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB921896_sqlrun_sql.msp.log
Date and Time MSP Error: 29528The setup has encountered an unexpected error while Installing performance counters. The error is: The specified driver is invalid.
Date and Time MSP returned 1603: A fatal error occurred during installation.
Date and Time Copy Engine: Error, unable to install MSP file: e:\ddf143eddce69fe41b19cf97ff46\HotFixSQL\Files\sqlrun_sql.msp
Date and Time The following exception occurred: Unable to install Windows Installer MSP fileDate:
Date and TimeFile: \depot\sqlvault\stable\setupmainl1\setup\sqlse\sqlsedll\copyengine.cppLine: 800The following error message is logged in the SQL9_Hotfix_KB921896_sqlrun_sql.msp file:

<Func Name=’Do_sqlPerfmon2′>
<EndFunc Name=’Do_sqlPerfmon2′ Return=’2001′ GetLastError=’2′>
PerfTime Stop: Do_sqlPerfmon2 : Tue Mar 27 14:49:19 2007
Gathering darwin properties for failure handling.
MSI (s) (70!34) [Time]: Transforming table Error.
MSI (s) (70!34) [Time]: Note: 1: 2262 2: Error 3: -2147287038
Error Code: 2001
MSI (s) (70!34) [Time]: Product: Microsoft SQL Server 2005 — Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The specified driver is invalid.
Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The specified driver is invalid.
<EndFunc Name=’LaunchFunction’ Return=’2001′ GetLastError=’0′>
MSI (s) (70:B8) [Time]: User policy value ‘DisableRollback’ is 0
MSI (s) (70:B8) [Time]: Machine policy value ‘DisableRollback’ is 0
Action ended Time: InstallFinalize. Return value 3
Resolution
The Setup program performs a find-and-replace operation on the following files:Perf-InstanceNamesqlctr.iniPerf-InstanceNamemsmdctr.ini file The find-and-replace operation is case sensitive. If the folder that you specify to install the component has the same name as the service name of the default instance of the component, many strings in the file will be replaced. Therefore, you receive the error message.