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: Inserting Unicode data into SSCE causes SQL Server CE to stop responding or causes an exception error

Symptoms
Inserting certain Unicode strings into a SQL Server 2000 Windows CE (SSCE) table might cause an SQL INSERT command to fail with an application error, or the application might stop responding (hang) while other programs remain responsive. The symptoms of the problem can vary, but may include messages similar to:

Application <Executable file name> has performed an illegal operation and will be shut down. Fatal Exception 0xC0000005
Resolution
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem.
To resolve this problem, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and 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.
The English version of this fix 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.
Microsoft SQL Server 2000 Windows CE Edition 2.0

DateTimeVersionSizeFile name—————————————————————–15-Apr-200314:152.0.5214.01,403,972 bytesSsce20.dllARM
Microsoft SQL Server 2000 Windows CE Edition 1.1

DateTimeVersionSizeFile name—————————————————————–26-Feb-200320:441.1.5026.01,258,496 bytesSsce10.dllARMNote Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.

FIX: Indexed View May Cause a Handled Access Violation in CIndex::SetLevel1Names

Symptoms
A query based on an indexed view may cause a handled access violation exception in the CIndex::SetLevel1Names function and end the connection of the client
that submitted the query. Additionally, messages similar to the following are written
to the SQL Server error log:

2002-12-30 13:17:01.99 spid51 Using ‘dbghelp.dll’ version ‘4.0.5′
*Stack Dump being sent to C:\Program Files\Microsoft SQL Server\MSSQL\log\SQL00001.dmp
2002-12-30 13:17:01.99 spid51 Error: 0, Severity: 19, State: 0
2002-12-30 13:17:01.99 spid51 SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process..
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 information The English version of this fix 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————————————————————————-17-Jan-200220:452000.80.568.029,244 bytesDbmslpcn.dll30-Aug-200213:08786,432 bytesDistmdl.ldf30-Aug-200213:082,359,296 bytesDistmdl.mdf11-Dec-200209:50180 bytesDrop_repl_hotfix.sql02-Jul-200207:352000.80.650.0107,088 bytesImpprov.dll11-Dec-200209:501,402 bytesInst_repl_hotfix.sql19-Jul-200208:56774,516 bytesInstdist.sql20-Aug-200208:242000.80.679.0111,172 bytesLogread.exe15-Dec-200215:212000.80.717.090,692 bytesMsgprox.dll06-Apr-200218:082000.80.606.062,024 bytesOdsole70.dll02-Jan-200217:5918,185 bytesQfe356326.sql20-Aug-200208:472000.80.679.0135,748 bytesQrdrsvc.exe26-Aug-200214:492000.80.679.0406,088 bytesRdistcom.dll03-Oct-200117:36437,302 bytesReplcom.sql20-Aug-200208:332000.80.679.0152,136 bytesReplmerg.exe25-Nov-200213:431,004,990 bytesReplmerg.sql15-Dec-200215:212000.80.717.0221,768 bytesReplprov.dll15-Dec-200215:212000.80.717.0303,688 bytesReplrec.dll03-Oct-200117:36986,906 bytesReplsys.sql03-Oct-200117:36881,228 bytesRepltran.sql26-Aug-200214:492000.80.679.0283,208 bytesRinitcom.dll16-Sep-200214:31390,045 bytesSecurityhotfix.sql26-Aug-200214:492000.80.679.028,672 bytesSqlagent.dll26-Aug-200210:392000.80.679.0311,872 bytesSqlagent.exe28-Aug-200208:322000.80.679.049,152 bytesSqlagent.rll26-Aug-200214:492000.80.679.053,824 bytesSqlcmdss.dll28-Aug-200208:402000.80.679.012,288 bytesSqlcmdss.rll24-Oct-200209:372000.80.695.0176,696 bytesSqlmap70.dll27-Dec-200221:392000.80.721.07,471,185 bytesSqlservr.exe01-Nov-200210:562000.80.698.045,644 bytesSqlvdi.dll17-Jan-200220:452000.80.568.029,244 bytesSsmslpcn.dll19-Dec-200216:552000.80.719.082,492 bytesSsnetlib.dll19-Dec-200218:092000.80.720.025,148 bytesSsnmpn70.dll06-Apr-200218:082000.80.606.070,208 bytesXplog70.dll06-Apr-200218:082000.80.606.053,828 bytesXpqueue.dll06-Apr-200218:082000.80.606.0156,228 bytesXprepl.dll11-Jul-200217:002000.80.658.0279,104 bytesXpstar.dll16-Sep-200215:122000.80.686.098,872 bytesXpweb70.dll NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.

FIX: CPU utilization may approach 100 percent on a computer that is running SQL Server 2000 every 49.7 days

Symptoms
This article describes the following about this hotfix release: The issues that are fixed by this hotfix packageThe prerequisites for installing the hotfix packageInformation about whether you must restart the computer after you install the hotfix packageInformation about whether you must make any registry changes The files that are contained in the hotfix package
Resolution
Consider the following scenario. You have a SQL Server 2000 service that is running on a computer that has a system time thatis approaching a multiple of 49.7 days from the time when the operating system is restarted. Around this period, you back up a database at least one time, or you restore a database at least one time. In this scenario, CPU utilization may approach 100 percent after the backup operation is complete or after the restore operation is complete. After approximately 15 minutes or less, CPU utilization automatically decreases.
If you back up the database or restore the database when CPU utilization approaches 100 percent, CPU utilization appears to decrease.
Note This problem appears to occur more frequently on Itanium-based computers than on x86-based computers. This problem is very noticeable on the SQL Server servers that perform backup operations or restore operations around this 49.7 day interval.
For a list of all publicly released SQL Server 2000 Post-Service Packhotfixes, see the following article in the Microsoft Knowledge Base:
894905?(http://support.microsoft.com/kb/894905/) Cumulative list of the hotfixes that are available for SQL Server 2000 SP4

FIX: An access violation occurs intermittently when you run an application that uses SQL Server 2005 service broker or SQL Server 2008 service broker

Symptoms
When you run an application that uses Microsoft SQL Server 2005 service broker or Microsoft SQL Server 2008 service broker, an access violation occurs intermittently. Then, error messages that resemble the following arelogged in the SQL Server error log file:

<Date Time>,spid76,Unknown,Service Broker needs to access the master key in the database ‘<Database Name>’. Error code:25. The master key has to exist and the service master key encryption is required.
<Date Time>,spid22s,Unknown,*
<Date Time>,spid22s,Unknown,* Access Violation occurred reading address 0000000000000000
<Date Time>,spid22s,Unknown,* Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
<Date Time>,spid22s,Unknown,* Exception Address = 0000000002B8FA73 Module(sqlservr+0000000001B8FA73)
<Date Time>,spid22s,Unknown,*
<Date Time>,spid22s,Unknown,*
<Date Time>,spid22s,Unknown,*
<Date Time> spid 22
<Date Time>,spid22s,Unknown,* BEGIN STACK DUMP:
<Date Time>,spid22s,Unknown,*
<Date Time>,spid22s,Unknown,* *******************************************************************************
<Date Time>,spid22s,Unknown,SqlDumpExceptionHandler: Process 22 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION.
SQL Server is terminating this process.
<Date Time>,spid22s,Unknown,***Stack Dump being sent to C:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\SQLDump0001.txt
<Date Time>,spid22s,Unknown,An error occurred in the Service Broker internal activator while trying to scan the user queue ‘<User Queue>’ for its status. Error: 2905<c/> State: 2.These error messages describe the following sequence of events. An error occurs when SQL Server 2005 or SQL Server 2008 accesses the master key. This error causes the access violation. Additionally, other errors occur when SQL Server 2005 or SQL Server 2008 tries to scan the user queue.
Note A mini-dump file is generated in the SQL Server logfolder.
Resolution
This problem occurs because of a race condition between the alter operation for a queue whose status is “on” and the drop operation for the same queue. If the drop operation succeeds, the access violation occurs. Additionally, the queue cannot be scanned successfully aspart of the alter operation.

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 stack overflow exception may occur, and SQL Server 2000 may unexpectedly close when you submit a query that uses the UNION ALL operator more than 255 times

Symptoms
This article describes the following about this hotfix release:The issues that are fixed by this hotfix packageThe prerequisites for applying the hotfix packageInformation about whether you must restart the computer after you install the hotfix packageInformation about whether the hotfix package is replaced by any other hotfix packageInformation about whether you must make any registry changes The files that are contained in the hotfix package
Resolution
Consider the following scenario. You create a query that uses the UNION ALL operator more than 255 times. You submit this query from a client application to Microsoft SQL Server 2000. In this scenario, a stack overflow exception may occur, and then SQL Server unexpectedly closes. When this problem occurs, the client application receives the following error message:

Server: Msg 8621, Severity 17, State 1, Line 1 Internal Query Processor Error: The query processor ran out of stack space during query optimization. Additionally, the following error is written to the SQL Server error log:

Date Time spid52 Date Time Stack Overflow Dump not possible – Exception c00000fd E at 0×00000000005A8C70
Date Time spid52 Address=5a8c70 Exception Code = c00000fd
Date Time spid52 <the query statement (only part of the statement will be saved here due to length consideration>
Date Time spid52
Date Time spid52 TotalPhysicalMemory = 2139881472, AvailablePhysicalMemory = 1585553408
Date Time spid52 AvailableVirtualMemory = 7677010944000, AvailablePagingFile = 3594182656 On computers that run on the IA-64 architecture, the client application may receive the following error message:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Severity 16, State 1, Line 0 General Network Error. Connection broken Finally, the following error is written to the SQL Server event log:
Event type: Error
Event source: Service Control Manager
Event catalog: None
Event ID: 7034
Date: Date
Time: Date
User: N/A
Computer: ComputerName
Description: The MSSQLSERVER service terminated unexpectedly. It has done this 1 time(s). For a list of all publicly released SQL Server 2000 Post-Service Pack 3a hotfixes, see the following article in the Microsoft Knowledge Base:
810185?(http://support.microsoft.com/kb/810185/) SQL Server 2000 hotfix update for SQL Server 2000 Service Pack 3 and 3a