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

Error message when you start SQL Server 2005 Management Studio: “Input string was not in a correct format”

Symptoms
When you start Microsoft SQL Server 2005 Management Studio, you may receive the following error message:

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Input string was not in a correct format.If you click Detail in the dialog box, the following error message text appears at the top of the details:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.LoginControl.InitFromLastUsedServerType()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.DoOneTimeInitialization()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.OnVisibleChanged(EventArgs e)
at Microsoft.SqlServer.Management.UI.VSIntegration.ShellConnectionDialog.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Resolution
This problem occurs if the value of the following registry key is not empty or is set to an invalid value:
HKEY_CURRENT_USER\Control Panel\International\sPositiveSign

FIX: Parallel Hash Join with Empty Result Set Incorrectly Flows Error Back on Client Connection

Symptoms
If you run a SQL Server Data Manipulation Language (DML) statement from a DB-Library based application against a Microsoft SQL Server 7.0 server, the error handler for the application may incorrectly fire and only report the following error message:

DB-LIBRARY Error 10007, Severity 5:
General SQL Server error: Check messages from the SQL Server.Note that this error message accompanies a wide range of SQL Server errors that are reported back to the client from the server. However, in this scenario the preceding error message is the only error reported and it is not accompanied by any other specific error messages.
Resolution
If a parallel hash join produces an empty result set, internal exception 3602 is used to coordinate the shutdown of worker threads that were created to process the parallel hash plan. The internal 3602 exception is an internal control exception that is used to direct processing flow inside SQL Server and is expected behavior in this case.
However, the fact that it is causing an error to be sent back on the client connection, which in turn causes the DB-Library error handler to fire is not expected behavior.

FIX: Merge Agent Fails with a “The remote procedure call failed and did not execute” Error

Symptoms
The merge agent fails with the following error message:

The remote procedure call failed and did not executeThe task reports the preceding remote procedure call (RPC) failure in its history, which can be misleading because there are not any other connectivity problems. The merge agent runs into a handled exception with the following stack, as seen in the replication exception log file:

The Exception Stack Dump follows:
ntdll77f67546RtlpWaitForCriticalSection
ntdll41d70871RtlEnterCriticalSection
replrec41d68839CReconcilerHistory::AddMessage
replrec41d666c8CDatabaseReconciler::LogProgressMessage
replrec41d66362CDatabaseReconciler::ProcTombstones
replrec41d65449CDatabaseReconciler::MoveChangesToDest
replrec00403819CDatabaseReconciler::Reconcile
replmerg004038e2CReconcilerTask::Reconcile
replmerg00407af8AgentRun
replmerg08ec83ecAgentMain

Resolution
The RPC failed message is the result of a exception with the merge agent. Replmerg.exe fails while inserting generation history, generating an exception when completely filling the allocated memory buffer. This causes an out of space situation and the required null termination character cannot be added, subsequently causing the access violation.

FIX: Error message when you run a query that selects many columns and that joins many tables in SQL Server 2005 Service Pack 2: “The query processor could not produce a query plan”

Symptoms
In Microsoft SQL Server 2005 Service Pack 2, you run a query that selects many columns and that joins many tables. When you do this, you may receive the following error messages:
Error message 1

8624 error is being generated and a mini-dump written by the exception handler.
Error message 2

Msg 8624, Level 16, State 1, Line 1
Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.Additionally, a minidump file is generated in the SQL Server log.
Resolution
This issue occurs because the query runs under the execution context of the sp_cursoropen stored procedure. The SQL Server 2005 Database Engine generates an exception when SQL Server 2005 tries to create an execution plan.

FIX: Error message in the database mail log when you try to use the sp_send_dbmail stored procedure to send an e-mail in SQL Server 2005: “Invalid XML message format received on the ExternalMailQueue”

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 the hotfix package is replaced by any other hotfix packageInformation about whether you must make any registry changesThe files that are contained in the hotfix package
Resolution
When you try to use the sp_send_dbmail stored procedure to send an e-mail in SQL Server 2005, an error message that resembles the following is written to the database mail log:

Invalid XML message format received on the ExternalMailQueue. conversation_handle: 61D18223-D17B-DB11-B0E7-0014221181C7.message_type_name: {//www.microsoft.com/databasemail/messages}SendMailStatus.message body:
<?xml version=”1.0″ encoding=”utf-8″?>
<responses:SendMail xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://schemas.microsoft.com/databasemail/responses ResponseTypes.xsd” xmlns:responses=”http://schemas.microsoft.com/databasemail/responses”>
<Information>
<Failure Message=”The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2006-11-24T16:33:54). Exception Message: Could not connect to mail server. (Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’h?te de connexion n’a pas répondu).&#xD;&#xA;)” />
</Information>
<MailItemId Id=”2″ />
<SentStatus Status=”3″ />
<SentAccountId Id=”0″ />
<SentDate Date=”2006-11-24T16:33:54″ />
<CallingProcess Id=”864″ />
</responses:SendMail>Note The following text is the English translation of the error message:
A connection attempt failed because the party connected did not properly respond within a certain period of time, or a connection established failed because the host connection did not respond.
Additionally, when you query the msdb.dbo.sysmail_allitems table for the operation record, you notice that the value of the sent_status column is UNSENT instead of FAILED.
This problem occurs if the following conditions are true: You are running SQL Server 2005 on a localized version of the Microsoft Windows operating system. For example, you are running SQL Server 2005 on the French version of Microsoft Windows Server 2003.The e-mail actually was not sent for some reason. For example, the e-mail was not sent because of an unknown recipient or an incorrect server name.

Error message when you install SQL Server 2005 SP2, SQL Server Express SP2, or SQL Server Express with Advanced Services SP2: “SQL Server Setup failed to execute a command for server configuratio …

Symptoms
When you install Microsoft SQL Server 2005 Service Pack 2 (SP2), SQL Server 2005 Express Edition (SQL Server Express) SP2, or SQL Server Express with Advanced Services SP2, you receive the following error message:

SQL Server Setup failed to execute a command for server configuration.The error was [Microsoft] [SQL Native Client] [SQL Server] CREATE DATABASE failed. Some File names listed could not be created. Check related errorrs.. Refer to the server error logs and Setup logs for detailed error information.Note In this error message, “errorrs” is a misspelling of the word “errors.” Also, the sentence “Check related errorrs..” has two period (.) characters.
Additionally, you experience one of the following symptoms.
Symptom 1When you perform a new installation of SQL Server Express SP2 or of SQL Server Express with Advanced Services SP2, the following error message is logged in the SQLSetup0001_ComputerName_SQL.log file:

SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft] [SQL Native Client] [SQL Server]Incorrect syntax near ‘=’.
[SQL Server]Cannot dump ##MS_AgentSigningCertificate##. SYSDBUPG.SQL terminating.This problem occurs if the length of the installationpath exceeds 58 characters.
Symptom 2When you install SQL Server Express SP2 or SQL Server Express with Advanced Services SP2 on an existing instance of SQL Server Express, the followingerror messages is logged in the SQLSetup0001_ComputerName_SQL.log file:

SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][SQL Native Client][SQL Server]CREATE DATABASE failed. Some file names listed could not be created. Check related errors.. Refer to the server error logs and Setup logs for detailed error information.Note In this error message, the sentence “Check related errors..” has two period characters.
This problem occurs if the length of the installationpath exceeds 58 characters.
Symptom 3When you install SQL Server 2005 SP2 on an existing instance ofSQL Server 2005 Service Pack 1 (SP1) or on an existing instance of the original release version of SQL Server 2005, the following error message is logged in the SQL9_Hotfix_KB921896_Sqlrun_Sql.msp.log file:

[SQL Server]Incorrect syntax near ‘=’.
[SQL Server]Cannot dump ##MS_AgentSigningCertificate##. SYSDBUPG.SQL terminating.This problem occurs if the length of the installation path exceeds 128 characters.
Resolution
This problem occurs because the script in the Sysdbupg.sql file contains the following code to escape quotations in a file name.

SELECT @certificate_name = QUOTENAME(@certificate_name, ””)The QUOTENAME function returns null if the length of the input value exceeds 128 characters. The longer path name triggers an error in the script.