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 December, 2009

FIX: The CPU usage and the memory usage increase gradually and many session IDs are in the dormant status in SQL Server 2005 and in SQL Server 2008

Symptoms
In Microsoft SQL Server 2005 and in Microsoft SQL Server 2008, the CPU usage and the memory usage increase gradually. Additionally, you find many orphaned session IDs when you run a query against the sys.sysprocesses view. The status of those orphaned session IDs is dormant. The value of the last_batch column for these session IDs is five minutes earlier than the current time.
Note In SQL Server 2005, the maximum retention period of the internal connection pooling is five minutes.
Resolution
Cumulative update information for SQL Server 2005 Service Pack 2 The fix for this issue was first released in Cumulative Update13 for SQL Server 2005 Service Pack 2. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
967908?(http://support.microsoft.com/kb/967908/LN/) Cumulative update package 13 for SQL Server 2005 Service Pack 2Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
937137?(http://support.microsoft.com/kb/937137/LN/) The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 2 was releasedMicrosoft SQL Server 2005hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 2 hotfix to an installation of SQL Server 2005 Service Pack 2. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.
Cumulative update information for SQL Server 2005 Service Pack 3 The fix for this issue was also released in Cumulative Update3 for SQL Server 2005 Service Pack 3. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
967909?(http://support.microsoft.com/kb/967909/LN/) Cumulative update package 3 for SQL Server 2005 Service Pack 3Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
960598?(http://support.microsoft.com/kb/960598/LN/) The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was releasedMicrosoft SQL Server 2005hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 3 hotfix to an installation of SQL Server 2005 Service Pack 3. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.
Cumulative update information for SQL Server 2008The fix for this issue was first released in Cumulative Update 5 for SQL Server 2008. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
969531?(http://support.microsoft.com/kb/969531/) Cumulative update package 5 for SQL Server 2008Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
956909?(http://support.microsoft.com/kb/956909/) The SQL Server 2008 builds that were released after SQL Server 2008 was released
Cumulative update information for SQL Server 2008 Service Pack 1The fix for this issue was first released in Cumulative Update 2 for SQL Server 2008 Service Pack 1. For more information about how to obtain this cumulative update package for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
970315?(http://support.microsoft.com/kb/970315/) Cumulative update package 2 for SQL Server 2008 Service Pack 1Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
970365?(http://support.microsoft.com/kb/970365/) The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released

FIX: SQL Server 2008 Setup fails if you installed the security update package 954459 for MSXML Core Services 6.0

Symptoms
Consider the following scenario:On a computer that is running Windows Server 2003 or Windows XP, you apply the update for Microsoft XML Core Services (MSXML) 6.0 that is described in the following Microsoft Knowledge Base article:

954459?(http://support.microsoft.com/kb/954459/) MS08-069: Description of the security update for XML Core Services 6.0: November 11, 2008After you apply this MSXML update, you try to install Microsoft SQL Server 2008 with a language different from the operating system’s language.For example, you try to install the English version of SQL Server 2008 in the Chinese version of Windows Server 2003.In this scenario, SQL Server 2008 Setup fails. If you examine the SQL Server setup log file, you find that the following error has been logged:

Slp: Running Action: Install_Msxml6_Cpu64_Action
Slp: Target package: <drive>:\x86\setup\x86\msxml6.msi
Slp: InstallPackage: MsiInstallProduct returned the result code 1603.
If you examine the MSXML setup log file, you may find that the following error has been logged:

Action start Time: SkipInstallCA.
This package is not supported on this operating system.
Action ended Time: SkipInstallCA. Return value 3.
Action ended Time: INSTALL. Return value 3
MSI (s) (9C:00) [Time]: Note: 1: 1729
MSI (s) (9C:00) [Time]: Product: MSXML 6 Service Pack 2 (KB954459) — Configuration failed. ……
MSI (s) (A0:D0) [Time]: Note: 1: 1708
MSI (s) (A0:D0) [Time]: Product: MSXML 6 Service Pack 2 (KB954459) — Installation failed. Note You can find the setup log files in the following folder:
%ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\LogNote This problem affects all the editions and releases of SQL Server 2008 that are earlier than SQL Server 2008 Service Pack 1.
Resolution
The SQL Server 2008 Setup package contains an MSXML 6.0 version that is earlierthan the version that is described in Knowledge Base article 954459.Because the operating system language is different, SQL Server 2008does not detect that a higher version already exists. Therefore, SQL Server 2008 Setup tries to install the MSXML 6.0 version in the package and fails.

FIX: Setup of SQL Server 2008 fails when the setup binary files are located in a folder whose path is in the 8.3 compatible format

Symptoms
You put the Microsoft SQL Server 2008 setup binary files in a folder whose path is in the 8.3 compatible format. When you start the Setup program, an exception may occur and the Setup program fails during the LoadExtensions action. Additionally, thefollowing error message is logged in the Detail_GlobalRules.txt file in the setup log folder:

<Date><Time> Slp:Message:
<Date><Time> Slp:Object of type ‘Microsoft.SQL.Chainer.Package.PropertiesTypeProperty’ cannot be converted to type ‘Microsoft.SQL.Chainer.Package.PropertiesTypeProperty’.
<Date><Time> Slp:Stack:
<Date><Time> Slp:at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
<Date><Time> Slp:at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
<Date><Time> Slp:at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
<Date><Time> Slp:at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
<Date><Time> Slp:at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionDatastoreIntegration.SetPropertiesOnRunningAction(ActionKey key, TextWriter loggingStream)
<Date><Time> Slp:at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionMetadata.NotifyInExecution(ActionKey actionRunning, TextWriter loggingStream)
<Date><Time> Slp:at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
<Date><Time> Slp:at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
Note The 8.3 compatible format refers to the 8 characters that are used for the file name, and the 3 characters that are used for the file name extension. This format is used for MS-DOS. For example, the file name “ABCDEFGHIJK” in the 8.3 compatible format is “ABCDEF~1.”
Resolution
When SQL Server 2008 uses the Assembly.LoadFrom() function to load file name extensions, the 8.3 compatible path cannot match the real path, and this causes the exception that is described in the “Symptoms” section.

FIX: In SQL Server 2008, the IntelliSense feature may become unavailable when you type Transact-SQL statements in the Query Editor in SQL Server Management Studio

Symptoms
In Microsoft SQL Server 2008, you enable the IntelliSense feature in the Query Editor in SQL Server Management Studio. When you type Transact-SQL statements in the Query Editor, the IntelliSense feature may become unavailable, and you do not receive an error message.
Resolution
This problem occurs because of an invalid statement in the Query Editor. When the database engine parses the statement, the database engine throws a System.FormatException exception. This exception stops the IntelliSense feature.

FIX: Exception Error Closing an Application Containing a CoolBar Control

Symptoms
A Visual Basic application that has a CoolBar control crashes while exiting the application. This occurs when there is an End statement in the unload event of the form that hosts a CoolBar control. This behavior occurs only when running the executable and does not happen in the Visual Basic integrated development environment (IDE). The error message is similar to the following:
In the Windows 9x platform:

This program has performed an illegal operation and will be shutdown.Clicking on the Details button may reveal text similar to the following:

PROJECT1 caused an exception 10H in module MSVBVM60.DLL at 015f:66024d53.In Windows NT or Windows 2000 platform, the following error message appears:

Form1:Project1.exe – Application Error
The exception Floating-point inexact result.
(0xc000008f) occurred in the application at location 0×77f1d493.
Resolution
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected inService Pack 4 for Visual Studio 6.0.
For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
194022?(http://support.microsoft.com/kb/194022/EN-US/) INFO: Visual Studio 6.0 Service Packs, What, Where, Why
194295?(http://support.microsoft.com/kb/194295/EN-US/) HOWTO: Tell That a Visual Studio Service Pack Is InstalledTo download the latest Visual Studio service pack, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx(http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx)

FIX: Event ID 7904 is logged, and the SQL Server 2008 database is corrupted when you restore a SQL Server 2008 database from a sequence of transaction log backups

Symptoms
When you restore a Microsoft SQL Server 2008 database from a sequence of transaction log backups, the SQL Server 2008 database is corrupted. However, the original SQL Server 2008 database from which you backed up the transaction logs is not corrupted. When this issue occurs, the following event is logged:
Filestream corruption – missing files, error 7904.
The corruption is detected on a database that was restored from a sequence of backup logs. The original database does not seem to be corrupted.
7904162
Table error: The filestream file for “FileID” was not found.
Resolution
This issue occurs because a race condition occurs between skipped files that should be backed up by a later transaction log backup.
When a file is in an active transaction, a log sequence number is assigned to the file in the createLSN column.The log sequence number in the createLSN column is less than the log sequence number in the lastLSN column of the transaction log backup. However, the FSLOG entry is not recorded in the $FSLOG folder in time for the file to be marked “skipped” by the current transaction log backup. A later transaction log backup process does not back up the skipped file. Therefore, a broken log chain occurs.