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 ‘Time’

FIX: An access violation may occur when you remove all elements from the procedure cache for a linked server over an interrupted remote access connection

Symptoms
You may receive an access violation exception if all the following conditions are true:You connect to a linked SQL server by using remote access.You run the DBCC FREEPROCCACHE Transact-SQL statement on the linked server to remove all elements from the procedure cache.The remote access connection is interrupted when you remove all elements from the procedure cache.You may notice the following short stack dump file that corresponds to the access violation:

* Short Stack Dump* 004AE996 Module(sqlservr+000AE996) (CLob::DestroyDeep+00000026 Line 907+0000000F)* 008CB71E Module(sqlservr+004CB71E) (CXVariant::ClearDeep+00000116 Line 4519+00000000)* 004A4D82 Module(sqlservr+000A4D82) (CXVariant::Clear+00000022 Line 325+00000000)* 004C6F66 Module(sqlservr+000C6F66) (CAutoClearXVariant::~CAutoClearXVariant+00000016 Line 2020+00000016)* 006936A8 Module(sqlservr+002936A8) (CParamExchange::RestoreFromDbParams+00000588 Line 1168+0000000F)* 00692787 Module(sqlservr+00292787) (CRpcInterfaces::Relay+00000AC1 Line 814+00000000)* 00691C80 Module(sqlservr+00291C80) (CStmtExec::XretRemoteExec+00000422 Line 579+00000000)* 00674325 Module(sqlservr+00274325) (CStmtExec::XretExecute+00000465 Line 561+00000041)* 00608FD2 Module(sqlservr+00208FD2) (CMsqlExecContext::ExecuteStmts+00000560 Line 1578+00000010)* 00608657 Module(sqlservr+00208657) (CMsqlExecContext::Execute+00000368 Line 1227+0000000C)* 0063FAA0 Module(sqlservr+0023FAA0) (CSQLSource::Execute+000006D6 Line 1265+00000013)* 007DEAFE Module(sqlservr+003DEAFE) (language_exec+00000A2B Line 735+00000000)* 007E075E Module(sqlservr+003E075E) (process_commands+000001A1 Line 1765+00000009)* 04CF74BD Module(ums+000074BD) (ProcessWorkRequests+00000292 Line 449+0000000D)* 04CF6852 Module(ums+00006852) (ThreadStartRoutine+000000BD Line 263+00000007)* 77C07E53 Module(MSVCRT+00027E53) (endthread+000000AA)* 77E5D33B Module(kernel32+0001D33B) (RegisterWaitForInputIdle+00000043)
Resolution
Service pack informationTo resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/) How to obtain the latest SQL Server 2000 service pack
Hotfix informationThe English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

DateTimeVersionSizeFile name——————————————————————-31-May-200318:452000.80.818.078,400Console.exe25-Jun-200301:012000.80.818.033,340Dbmslpcn.dll25-Apr-200302:12786,432Distmdl.ldf25-Apr-200302:122,359,296Distmdl.mdf30-Jan-200301:55180Drop_repl_hotfix.sql23-Jun-200322:402000.80.837.01,557,052Dtsui.dll23-Jun-200322:402000.80.837.0639,552Dtswiz.dll24-Apr-200302:51747,927Instdist.sql03-May-200301:561,581Inst_repl_hotfix.sql08-Feb-200306:402000.80.765.090,692Msgprox.dll01-Apr-200302:071,873Odsole.sql05-Apr-200301:462000.80.800.062,024Odsole70.dll07-May-200320:412000.80.819.025,144Opends60.dll07-May-200318:47132,096Opends60.pdb02-Apr-200321:482000.80.796.057,904Osql.exe02-Apr-200323:152000.80.797.0279,104Pfutil80.dll22-May-200322:5719,195Qfe469571.sql11-Jul-200317:041,084,147Replmerg.sql04-Apr-200321:532000.80.798.0221,768Replprov.dll08-Feb-200306:402000.80.765.0307,784Replrec.dll11-Jul-200316:561,085,925Replsys.sql01-Jun-200301:012000.80.818.0492,096Semobj.dll31-May-200318:272000.80.818.0172,032Semobj.rll29-May-200300:29115,944Sp3_serv_uni.sql01-Jun-200301:012000.80.818.04,215,360Sqldmo.dll07-Apr-200317:4425,172Sqldumper.exe19-Mar-200318:202000.80.789.028,672Sqlevn70.rll02-Jul-200300:182000.80.834.0180,736Sqlmap70.dll08-Feb-200306:402000.80.765.057,920Sqlrepss.dll25-Jul-200321:452000.80.845.07,553,105Sqlservr.exe25-Jul-200321:4512,755,968Sqlservr.pdb25-Jul-200321:442000.80.845.0590,396Sqlsort.dll08-Feb-200306:402000.80.765.045,644Sqlvdi.dll25-Jun-200301:012000.80.818.033,340Ssmslpcn.dll01-Jun-200301:012000.80.818.082,492Ssnetlib.dll01-Jun-200301:012000.80.818.025,148Ssnmpn70.dll01-Jun-200301:012000.80.818.0158,240Svrnetcn.dll31-May-200318:592000.80.818.076,416Svrnetcn.exe30-Apr-200323:522000.80.816.045,132Ums.dll30-Apr-200323:52132,096Ums.pdb02-Jul-200300:192000.80.834.098,816Xpweb70.dllNote Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.

FIX: A minidump file is generated, and an error message is logged in the SQL Server error log when you run the DBCC MEMORYSTATUS statement in SQL Server 2005

Symptoms
This article describes the following about this hotfix release:The issues that are fixed by the hotfix packageThe prerequisites for installing the hotfix packageWhether you must restart the computer after you install the hotfix packageWhether the hotfix package is replaced by any other hotfix packageWhether you must make any registry changesThe files that are contained in the hotfix package
Resolution
When you run the DBCC MEMORYSTATUS statement in Microsoft SQL Server 2005, a minidump file is generated. Additionally, the following error message is logged in the SQL Server 2005 error log:

Date Time SPID ***Stack Dump being sent to T:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
Date Time SPID SqlDumpExceptionHandler: Process 128 generated fatal exception c0000094 EXCEPTION_INT_DIVIDE_BY_ZERO. SQL Server is terminating this process.
Date Time SPID *
Date Time SPID *
Date Time SPID * BEGIN STACK DUMP:
Date Time SPID * 07/27/07 09:55:00 spid 128
Date Time SPID *
Date Time SPID *
Date Time SPID * Exception Address = 0000000001911CC8
Module(sqlservr+0000000000911CC8)
Date Time SPID * Exception Code = c0000094
EXCEPTION_INT_DIVIDE_BY_ZERO

The installation fails when you try to install a new instance of SQL Server 2008 on an x64-based computer

Symptoms
When an instance of the x86-based version of Microsoft SQL Server 2008 and an instance of the x64-based version of SQL Server 2008 are installed on an x64-based computer, and you try to install a new instance of one version after you uninstall the instance of the other version, the installation fails. For example, the installation fails if you try to install a new instance of the x64-based version after you uninstall the x86-based version.
When this problem occurs, the following errors appear in the SQL Server 2008 log:

Date Time Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigNonRC and scenario ConfigNonRC.
Date Time Slp: System.ArgumentException: Cannot find service {0}.
Date Time Slp: Nazwa parametru: MSSQLServerADHelper100
Date Time Slp:w Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.ChangeServiceSecurity(EffectiveProperties properties)
Date Time Slp:w Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.Install_ConfigNonRC_Prepare(EffectiveProperties properties)
Date Time Slp:w Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.Install(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
Date Time Slp:w Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
Date Time Slp:w Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
Date Time Slp:w Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
Date Time Slp: Exception: System.ArgumentException.
Date Time Slp: Source: Microsoft.SqlServer.Configuration.SqlServer_ConfigExtension.
Date Time Slp: Message: Cannot find service {0}.
Date Time Slp: Nazwa parametru: MSSQLServerADHelper100.Date
Resolution
This problem occurs because the SQL Server Active Directory Helper Service is removed when you uninstall any instance of SQL Server 2008. On an x64-based computer, both 32-bit instances and 64-bit instances share the SQL Server Active Directory Helper service. However, a separate reference count of the service is maintained for each platform. Therefore, when you uninstall the last instance of either platform, the SQL Server Active Directory Helper service is deleted.
If multiple instances of a single platform are installed, this problem does not occur.

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.

FIX: Unable to Restore to a Point in Time in First Transaction Log Backup

Symptoms
You cannot restore to a point in time within the first transaction log backup for a database when you use SQL Server Enterprise Manager to perform the RESTORE operation.
In SQL Server 7.0, despite the value entered by the user, the GUI always defaults to the time at the end of the first transaction log.
In SQL Server 2000, the following error message occurs if you enter a point in time within the first transaction log:

The time specified is less than the minimum point in time allowed. Time corrected. After the user clicks OK to close the message box, you find that the end time of the transaction log has replaced the time entered earlier.
The subsequent execution of the RESTORE command restores the database to the end of first transaction log backup.
Resolution
SQL Server 2000To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211?(http://support.microsoft.com/kb/290211/EN-US/) INF: How to Obtain the Latest SQL Server 2000 Service Pack
SQL Server 7.0To resolve this problem, obtain the latest service pack for Microsoft SQL Server 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
301511?(http://support.microsoft.com/kb/301511/EN-US/) INF: How to Obtain the Latest SQL Server 7.0 Service Pack

FIX: SQL Enterprise Manager Restore to Point in Time Does Not Stop at Requested Time and the Database is Left in a Loading State

Symptoms
If all of the following conditions are true, a restore to a point-in-time leaves the database in a loading state (unrecovered) and does not stop at the requested time: You perform the restore through SQL Enterprise Manager (SEM).You restore one backup file (device) at a time, and you specify a “Point in Time” to stop in the last transaction log you restore.
Resolution
A restore to a point-in-time from Enterprise Manager does not stop at the requested time because Enterprise Manager automatically changes the point-in-time value to the backup time of the last transaction log.
A mechanism in the restore to a point-in-time leaves the database in a loading state if there are no log entries after the time you specify, to allow you to apply more transaction logs if you want.