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 ‘microsoft sqlserver’

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

The SQL Server 2008 installation process may fail if the server alias is defined in the Client Network Utility

Symptoms
When you try to install Microsoft SQL Server 2008, the installation process mayfail. Additionally, the following error may be written to the setup log:

DateTime Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
DateTime Slp Slp: Microsoft.SqlServer.Configuration.Sco.ScoException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 – No connection could be made because the target machine actively refused it.)
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.When connecting to SQL Server Version,, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 – No connection could be made because the target machine actively refused it.)This problem occurs if you have defined a server alias in the Client Network Utility for a protocol other than Shared Memory.
Resolution
This problem occurs because the user-defined server alias does not allow for shared memory connections.

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.

On a computer that has a 64-bit processor, you receive an error message in SQL Server Management Studio when you connect to SQL Server 2005 Integration Services or when you create or edit a maint …

Symptoms
You install a Microsoft SQL Server 2005 hotfixpackage on a computer that has a 64-bit processor. When youconnect to SQL Server 2005 Integration Services (SSIS) by using SQL Server Management Studio, you receive an error message that resembles the following:

TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
ADDITIONAL INFORMATION:
Connect to SSIS Service on machine “ComputerName” failed:
Error loading type library/DLL.Additionally, when you try to create or to edit a maintenance plan, you receive one of the following error messages:
Error message 1

Exception from HRESULT: 0xC0010014 (Microsoft.SqlServer.DTSRuntimeWrap)
Program Location:
at Microsoft.SqlServer.Dts.Runtime.ConnectionManager.get_Properties()
at Microsoft.SqlServer.Management.DatabaseMaintenance.TaskContextUI.InitializeConnectionCombo(String connectionName)
at Microsoft.SqlServer.Management.DatabaseMaintenance.DBMaintTaskBackupForm.SetTask(DbMaintenanceBackupTask task)
at Microsoft.SqlServer.Management.DatabaseMaintenance.DBMaintTaskBackupForm..ctor(TaskHost taskHost, IServiceProvider provider)
at Microsoft.SqlServer.Management.DatabaseMaintenance.DbMaintTaskBackupUI.GetView()at Microsoft.DataTransformationServices.Design.DtrTaskDesigner.GetTaskEditor()
Error message 2

Exception from HRESULT: 0xC0010014 (Microsoft.SqlServer.DTSRuntimeWrap)
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Sequence.get_Properties()
at Microsoft.DataTransformationServices.Design.DtsBaseDesigner.PreFilterProperties(IDictionary properties)
at Microsoft.DataTransformationServices.Design.DtsPropExpressionsDesigner.PreFilterProperties(IDictionary properties)
at Microsoft.DataTransformationServices.Design.DbMaintSequenceDesigner.PreFilterProperties(IDictionary properties)
at System.ComponentModel.Design.ComponentDesigner.System.ComponentModel.Design.IDesignerFilter.PreFilterProperties(IDictionary properties)
at System.ComponentModel.Design.TypeDescriptorFilterService.System.ComponentModel.Design.ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
at Microsoft.DataTransformationServices.Design.DtsTypeDescriptorFilterService.System.ComponentModel.Design.ITypeDescriptorFilterService.FilterProperties(IComponent component, IDictionary properties)
at System.ComponentModel.TypeDescriptor.PipelineFilter(Int32 pipelineType, ICollection members, Object instance, IDictionary cache)
at System.ComponentModel.TypeDescriptor.GetPropertiesImpl(Object component, Attribute[] attributes, Boolean noCustomTypeDesc, Boolean noAttributes)
at System.ComponentModel.TypeDescriptor.GetProperties(Object component)
at Microsoft.DataWarehouse.Design.Cud.VsTransaction.ChangeProperty(Object obj, String propertyName)
at Microsoft.DataTransformationServices.Design.DtsBasePackageDesigner.CreateExecutable(String moniker, IDTSSequence container, String name)This problem occurs if one of the following conditions is true:The SQL Server 2005 Integration Services hotfix package is installed. However, the SQL Server 2005 Tools hotfix package is not installed.You install the SQL Server 2005 Tools hotfix package before you install the SQL Server 2005 Integration Services hotfix package.You are running two instances of SQL Server 2005 on the computer. Additionally, the versions of both instances of SQL Server are earlier versions than Microsoft SQL Server 2005 Service Pack 2 (SP2).The computer is running an instance of SQL Server 2005 with SP2. Additionally, you install a post-SP2 hotfix on this instance. Then you install a second instance of SQL Server 2005. On the second instance, you install SQL Server 2005 SP2.
Resolution
This problem occurs because the installer unregisters the 32-bit Dts.dll file when the installer installs the 64-bit Dts.dll file. The 64-bit Dts.dll file is installed together with SQL Server 2005 SP2. Additionally,the 64-bit Dts.dll file may be installed together with any SSIS hotfix package that contains the 64-bit Dts.dll file.

FIX: You may experience problems when you use SQL Server Management Studio in SQL Server 2005 to connect to an instance of SQL Server 2008

Symptoms
When you use SQL Server Management Studio in Microsoft SQL Server 2005 to connect to an instance of Microsoft SQL Server 2008, you may experience the following problems.
Problem 1When you open or delete a maintenance plan, you receive the following error message:

Exception has been thrown by the target of an invocation. (mscorlib)
ADDITIONAL INFORMATION:
While trying to find a folder on SQL an OLE DB error was encountered with error code 0×80040E14 (Could not find stored procedure ‘msdb.dbo.sp_dts_getfolder’.).
Problem 2When you copy a database from an instance of SQL Server 2008 to an instance of SQL Server 2005, you receive the following error message:

Message:Executed as user: UserName. …0.0.1080.5 for 32-bitCopyright (C) Microsoft Corp 1984-2005. All rights reserved.Started:TimeProgress: Date TimeSource: SATEESP-MAIN_SATEESP-MAIN_Transfer Objects TaskTask just started the execution.: 0% completeEnd ProgressError: Date TimeCode: 0×00000000Source: SATEESP-MAIN_SATEESP-MAIN_Transfer Objects TaskDescription: An exception occurred while executing a Transact-SQL statement or batch.StackTrace:at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand)at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataReader(String query)at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)at Microsoft.Sq…The package execution fa…The step failed.
Problem 3When you create a table or a view, you receive the following error message:

Microsoft.SqlServer.Types (Error)
Messages
Either the object or one of its properties is not supported on the target server version. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3207.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.UnsupportedVersionException&LinkId=20476
Resolution
The fix for this issue was first released in Cumulative Update5. For more information about how to obtain this cumulative update package for SQL Server 2005 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:
943656?(http://support.microsoft.com/kb/943656/LN/) Cumulative update package 5 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 2005 hotfixes 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.

FIX: Error messages after SQL Server 2005 or SQL Server 2000 has been running for some time on Windows Server 2003 or on Windows 2000: “Failed to load FileName.dll” and “Attempts to load any type …

Symptoms
When you run Microsoft SQL Server 2005 or Microsoft SQL Server 2000 on a Windows Server 2003-based computer or on a Windows 2000-based computer, you may receive an error message that contains the following error messages:

Failed to load FileName.dll

Attempts to load any type of dll might fail within the SQL Server process with errors pointing to LoadLibrary failure.This problem usually occurs after SQL Server has been running for some time.
The complete error message that you receive resembles the following:

Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: The read on the database failed. Reason: Failed to load Msxmlsql.dll.
Data: System.Collections.ListDictionaryI,4092,NULL,NULL,2007-04-13 09:44:11.640,DB\SQLServer5,warning,2007-04-13 09:44:13.153,
The activated proc [dbo].[sp_sysmail_activate] running on queue msdb.dbo.ExternalMailQueue output the following:’The service queue “ExternalMailQueue” is currently disabled.’
Attempts to use XML related activity in TSQL fails.
Msg 6610, Level 16, State 1, Procedure sp_xml_preparedocument, Line 1
Failed to load Msxmlsql.dll.
Msg 6607, Level 16, State 3, Procedure
sp_xml_removedocument, Line 1sp_xml_removedocument: The value supplied for parameter number 1 is invalid.
Attempts to load any type of dll might fail within the SQL Server process with errors pointing to LoadLibrary failure.
Attempts to use extended stored procedures will result in
Msg 0, Level 16, State 0, Procedure xp_ss_backup, Line 1
Cannot load the DLL C:\Program Files\Microsoft SQL Server\MSSQL\Binn\SQLsafe_ExtendedStoredProc.dll, or one of the DLLs it references. Reason: 1114(A dynamic link library (DLL) initialization routine failed.).
Error: 18210, Severity: 16, State: 1.
BackupVirtualDeviceSet::Initialize: CoCreateInstance failure on backup device ‘d4630f27-03a1-47ae-b7a7-4813a6809908′. Operating system error 0×8007045a(A dynamic link library (DLL) initialization routine failed.).
Resolution
This problem occurs because no thread local storage (TLS) slot is available for the SQL Server process (Sqlservr.exe). This is a problem in Windows Server 2003 and in Windows 2000.
When SQL Server unloads a DLL, the TLS slots that the DLL uses may not be released because of a problem in the TlsFree function. If SQL Server frequently loads various DLLs, and then unloads these DLLs, these DLLs use up all the available TLS slots. Eventually, SQL Server can no longer load a DLL that requires TLS slots.