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, 2010

An application that uses the Virtual Device Interface feature of SQL Server 2000 to back up a SQL Server 2000 database may not back up the database

Symptoms
An application that uses the Virtual Device Interface feature of Microsoft SQL Server 2000 to back up a SQL Server 2000 database may not back up the database. When the backup operation fails, you experience the followingexception:
HRESULT 0×80070005 Additionally, an error message that is similar to the following error message is logged in the VDI.log file:

Date Time pid(3260) tid(4004)
Error on VIRTUALDEVICE_master
Error at CVDS::Create: Create Memory Status Code: 5, x5
Explanation: Access is denied. You typically experience this issue when multiple instances of the application that uses the Virtual Device Interface feature try to connect at the same time to different instances of SQL Server to initiate backups.
Resolution
This issue occurs because the instances of the application that uses the Virtual Device Interface feature pass the same virtual device name to the IClientVirtualDeviceSet2::CreateEx function at the same time. SQL Server uses that virtual device name as the memory-mapped file name when SQL Server sets up shared memory for backup. This naming conflict causes the backup to fail.

After you install a 64-bit version of SQL Server 2005 on a 64-bit version of Windows, the 32-bit entries for SQL Native Client Configuration and for SQL Server 2005 Network Configuration appear i …

Symptoms
After you install a 64-bit version of Microsoft SQL Server 2005 on a 64-bit version of a Microsoft Windows operating system, the 32-bit entries for SQL Native Client Configuration and for SQL Server 2005 Network Configuration appear in SQL Server Configuration Manager.
Resolution
Some tools that are installed together with a 64-bit version of SQL Server 2005 are available only as 32-bit versions. When you install a 64-bit version of SQL Server 2005, the 32-bit versions of the following tools are installed:SQL Server Management StudioSQL Server Configuration ManagerDatabase Engine Tuning AdvisorThe following entries appear in SQL Server Configuration Manager:SQL Server 2005 Network Configuration (32bit)SQL Native Client Configuration (32bit)SQL Server 2005 Network ConfigurationSQL Native Client ConfigurationThe following table contains information about each entry.
Note Client Network Utility (Cliconfg.exe) is available in SQL Server 2000.In SQL Server 2005, the functionality of this tool is included in SQL Server Configuration Manager. However, to address backward compatibility issues, Client Network Utility is included in SQL Server 2005.
Collapse this tableExpand this table
Entry in SQL Server Configuration ManagerVersionResidence of aliases that are created in SQL Server Configuration ManagerCorresponding subkey in the registryApplications that are affected by the protocol settingsAvailability of aliases to applicationsResidence of aliases that are created by Client Network UtilitySQL Native Client Configuration (32bit)32-bitAliases that are created in this entry reside only in this entryHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectToNot applicableOnly 32-bit applications can use aliases in this entryNot applicableSQL Native Client Configuration64-bitAliases that are created in this entry reside only in this entryHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectToNot applicableOnly 64-bit applications can use aliases in this entryResides only in this entrySQL Server 2005 Network Configuration (32bit)32-bitNot applicableHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\SNI9.0Only 32-bit applications are affectedNot applicableNot applicableSQL Server 2005 Network Configuration64-bitNot applicableHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SNI9.0Only 64-bit applications are affectedNot applicableNot applicable

A System.InvalidOperationException exception may occur when you try to use a Visual Studio .NET 2003 client application against a SQL Server 2005 native Web service

Symptoms
When you try to use a Microsoft Visual Studio .NET 2003 client application against a Microsoft SQL Server 2005 native Web service,a System.InvalidOperationException exception may occur.
Resolution
This problem occurs because the System.Data.DataSet object that Visual Studio .NET 2003 uses does not support the XML Schema definition language (XSD) schemas that SQL Server 2005 generates.

Additions to the SQL Server 2000 Service Pack 4 readme files

Symptoms
This article describes late-breaking changes in Microsoft SQL Server 2000 Service Pack 4 (SP4) that are not documented in some or all of the available SQL Server readme files. The following is a list of the readme files that are available for SQL Server 2000 SP4:ReadmeSql2k32asp4.htm: “Service Pack 4 for Microsoft SQL Server 2000 – Analysis Services” ReadmeSql2k32sp4.htm: “Service Pack 4 for Microsoft SQL Server 2000 – Database Components” ReadmeSql2k32desksp4.htm: “Service Pack 4 for Microsoft SQL Server 2000 – Desktop Engine (MSDE 2000)” ReadmeSql2k64sp4.htm: “Service Pack 4 for Microsoft SQL Server 2000 (64-bit)”
Resolution
Information that has changedThe following information has changed since publication of the SP4 readme files.Running Address Windowing Extensions (AWE)with SQL Server 2000 SP4Important We have found an issue with the final build of SQL Server 2000 SP4 that affects customers who run SQL Server with AWE support enabled. This issue does not affect the Itanium-based computers or other components of SQL Server beyond the relational databases, such as SQL Server 2000 Analysis Services, SQL Server 2000 Reporting Services, and SQL Server 2000 Notification Services. This issue only affects computers that have more than 2 GB of memory where AWE has been enabled and where more than half of the total system memory is being allocated to a single instance of SQL Server. Customers who have this configuration should apply the hotfix in the following Microsoft Knowledge Base article after they upgrade to SQL Server 2000 SP4:
899761?(http://support.microsoft.com/kb/899761/) FIX: Not all memory is available when AWE is enabled on a computer that is running a 32-bit version of SQL Server 2000 SP4Hotfixes are not included in Service Pack 4Hotfixes 836651 and 826906 were not included in SP4. Customers who apply SP4 in addition to this hotfix will have the hotfix overwritten. A post-SP4 hotfix for these issues will be available shortly.
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
836651?(http://support.microsoft.com/kb/836651/) FIX: You receive query results that were not expected when you use both ANSI joins and non-ANSI joins
826906?(http://support.microsoft.com/kb/826906/) FIX: A query that uses a view that contains a correlated subquery and an aggregate runs slowlySmssql2ksp4.pdf fileSQL Server 2000 SP4 includes a Smssql2ksp4.pdf file. This file contains a reference to Sms2kdef.bat and Sql2kdef.iss. However, these files no longer exist in the SQL Server 2000 SP4 package.
Note Every time that you run an attended installation of Database Components, the setup options will be written to the Setup.iss file that is located in the \System folder. For more information, see the “unattended installation” section in the SQL Server 2000 SP4 readme file.SQL Query Analyzer SQL Query Analyzer will permit connections to SQL Server 2005. However, some functionality may not be available. This functionality includes the following:Server Trace: The Server Trace window will not display any data. Object Search: The object search will not work. Manage Statistics: Existing statistics will not be displayed in the Manage Statistics dialog box.Registry extended stored procedures Changes were made to extended stored procedures that access the registry. Only members of the system administrator server roles may freely use these extended stored procedures without any difference in behavior from earlier service packs. For example, when you run queries that call registry extended stored procedures, you may receive an “access is denied” error message.
Warning The registry extended stored procedures are undocumented. They are subject to change without notice. And they are not officially supported to be used by applications. Therefore, we do not recommend that you call these procedures in the client code. There is no guarantee that these procedures will be available in later versions of SQL Server.
If all the following conditions are true, see Microsoft Knowledge Base article 887165: You are using registry extended stored procedures.You are not a system administrator.You require that SQL Server behave the way that it did before you upgraded to SP4.
887165?(http://support.microsoft.com/kb/887165/) BUG: You may receive an “Access is denied” error message when a query calls an extended stored procedure after you upgrade from SQL Server 2000 to SQL Server 2000 Service Pack 4 Upgrade SQL Server 2000 Desktop Engine (MSDE) to other versions of SQL Server 2000 If you upgrade SQL Server 2000 Desktop Engine(MSDE) to a different version of SQL Server 2000, such as to Personal Edition or to Developer Edition, you must reinstall SQL Server 2000 SP4 after you upgrade MSDE. Avoid errors when you connect to a third-party database by using Analysis Services If you are running Analysis Services SP4 on an AMD 64 system, and you plan to connect to a third-party database, confirm that the connectivity components for that database are certified for use under WoW by the third-party vendor. If those components are not certified, you may experience errors.Avoid errors when you try to obtain diagnostics for an instance of SP3 If you are installing SP4 on a computer where you will also be running SQL Server 2000 SP3, copy the Dbghelp.dll file from the SP4 BINN folder, and then add the Dbghelp.dll file to the SP3 BINN folder. After you do this, you can successfully capture diagnostics for the instance of SP3 if you have to do this later. Summary dialog box for SQL Server 2000 64-bit SP4 Setup After you have upgraded to SP4 on SQL Server 2000 64-bit, the summary dialog box may show the instance of SQL Server as “success.”However, dependant components or features may show as “not selected.” This is known behavior. For more information, see the SQL Server SP4 Setup log. Add new features to SQL Server 2000 (64-bit) SQL Server 2000 64-bit SP4may not correctly add features or may not correctly upgrade added features. Thisproblem may occur if the correct Windows Installer file name or ProductCode was not in the command line or in the Setup.ini file when the feature was originally added. To resolve this problem, uninstall the newly added feature, and then reinstall it by using the correct Windows Installer file name or ProductCode.
Note Although a feature has been added incorrectly, it may still appear in the Add or Remove Programs tool inControl Panel.Upgrade from SQL Server 2000 64-bit SP4 Beta to the Release to Manufacturing (RTM) versionYou must uninstall SQL Server 2000 64-bit SP4 Beta before you install the RTM version. Uninstall a SQL Server 2000 64-bit SP4clusterTo uninstall a SQL Server 2000 64-bit cluster, you will have to use the Unattended Setup feature and a corresponding Template.ini file. This Template.ini file should contain settings for the SQL Server 2000 64-bit installation. For more information about Template.ini files, see SQL Server 2000 64-bit Books Online.64-bitAnalysis Services installationIf Analysis Services 64-bit is not installed as part of an initial configuration, you cannot add Analysis Services through instance maintenance. If you want to add Analysis Services after the Setup process is completed, you will have to install Analysis Services as a component of a new, additional instance. 64-bit maintenance modeDuring maintenance mode, adding 64-bit Analysis Services features to an existing 64-bit SQL Server feature, or trying to add a 64-bit SQL Server feature to an existing 64-bit Analysis Services feature instance is not supported.
Items that are not documented correctly in the Database Components SP4 readme file3.5 Install database components on replicated servers Section 3.5 of the Database Components SP4 readme file (ReadmeSql2k32sp4.htm) incorrectly refers to “an instance of MSDE 2000.” Instead, it should refer to “an instance of the database engine.”
Section 3.5 of the Database Components SP4 readme file also states the following:
Before you upgrade to SP4, ensure that the Windows account under which the SQL Server service runs is a member of the sysadmin fixed server role. This statement is incorrect.You do not have to change the Windows account under which the SQL Server service runs before you upgrade to SP4. 3.4 Install on a failover clusterSection 3.4 of the 64-bit SP4 readme file (ReadmeSql2k64sp4.htm) currently states the following:
If you need to rebuild a node in the failover cluster, perform the following stepsRebuild the node in the failover cluster. For more information about rebuilding a node, see “How to recover from failover cluster failure in Scenario 1″ in SQL Server 2000 Books Online.Run the original SQL Server 2000 Setup program to add the node back to the failover cluster.Run the SQL Server 2000 SP4 Setup program on the active node that is running virtual server.NotesIf you run the SQL Server 2000 SP4 Setup program from the node that is runningvirtual server, you may have to reinstall SQL Server 2000 SP4 on all nodes. You may also have to run the database upgrade scripts again. This requirement may be a problem if the instance of SQL Server on the existing nodes has a post-SP4 hotfix installed.You can perform a binary-only installation by running the SQL Server 2000 SP4 Setup program on the new node if the node is a passive node. A binary-only installation only updates the binaries on the node on which you runthe SQL Server 2000 SP4 Setup program. A binary-only installation does run the database upgrade scripts. If you want to perform a binary-only installation, we recommend that you perform the installation on a test server before you implement the installation on a production server.
Run SP4 Setup from the node that was not rebuilt and that owns the SQL resources. 1.2.2 Considerations for an instance in a Replication or Log Shipping topologyIn section 1.2.2.of the ReadmeSql2k32sp4.htm file, under “Log Shipping and Database components,” the name of the referenced stored procedure is incorrect. It should be “sp_vupgrade_replication”.

A SQL Server backup is invalid when the backup is performed on a computer that is configured to use a DPT RAID controller card

Symptoms
When you restore backups that were performed through Microsoft SQL Server for databases created on a drive that is running a DPT SmartRAID V controller, the following error message may occur:

Msg 3270, Level 0, Sev 16
An internal consistency error occurred. Contact Technical Support for assistance.If you detach the database by using the sp_detach_db stored procedure and then try to attach the database by using the sp_attach_db stored procedure, the following error message may occur:

Server: Msg 5172, Level 16, State 15, Line 1
The header for file ‘d:\pubs.mdf’ is not a valid database file header. The PageAudit property is incorrect.The same error messages may also occur with other models of the DPT RAID controller card.
Resolution
This problem occurs from a particular combination of the firmware version on the DPT controller card and the version of the DPT Performance Enhancing driver, Dptdisk.sys.

A SQL Server cluster resource goes to a “failed” state when you try to bring the resource online in SQL Server

Symptoms
When you try to bring a SQL Server cluster resource online for a virtual instance of Microsoft SQL Server 2000, of SQL Server 2005, or of SQL Server 2008, you may notice the following behavior:The SQL Server cluster resource goes to a “failed” state and does not come online. You receive a combination of the following error messages on the computer that owns the SQL Server cluster resource.

Error message 1
An event that is similar to the following is in the system event log:

Date: 08/05/2004
Time: 1:11:19 AM
Source: ClusSvc
Category: Failover Mgr
Type: Error
Event ID: 1069
User: N/A
Computer: <Computer Name>
Description:
Cluster resource ‘SQL Server (<SQL Server instance name>)’ in Resource Group ‘<Cluster group name>’ failed.
Error message 2
An error message that is similar to the following is in the Cluster log file:

00000644.00000944::2003/11/30-18:11:30.360 SQL Server <SQLServer>: [sqsrvres] Unable to read the ‘VirtualServerName’ property. Error: d.
00000644.00000944::2003/11/30-18:11:30.360 SQL Server <SQLServer>: [sqsrvres] OnlineThread: Error d bringing resource online.
Error message 3
Error messages that are similar to the following are in the SQL Server error log file:

2003-11-30 17:00:37.27 server Error: 17826, Severity: 18, State: 1
2003-11-30 17:00:37.27 server Could not set up Net-Library ‘SSNETLIB’..
2003-11-30 17:00:37.27 spid13 Starting up database ‘SPB’.
2003-11-30 17:00:37.27 spid12 Starting up database ‘BD_MTA’.
2003-11-30 17:00:37.27 spid14 Starting up database ‘BD_SPF’.
2003-11-30 17:00:37.27 server Error: 17059, Severity: 18, State: 0
2003-11-30 17:00:37.27 server Operating system error -1073723998: ..
2003-11-30 17:00:37.27 server Unable to load any netlibs.
2003-11-30 17:00:37.27 server SQL Server could not spawn FRunCM thread.
Resolution
The resource-specific registry keys that correspond to the SQL Server cluster resource that you are trying to bring online are missing. This problem also occurs if the values that correspond to the resource-specific registry keys are not correct.