Error: Server is in script upgrade mode. Only administrator can connect at this time

 Server is in script upgrade mode. Only Administrators can connect at this time Error: 18401

script upgrade mode

The above error can generate after applying SQL Server Service pack. The problem arises when you apply a SP\CU and after restarting the server when you try to connect to SQL you get above error message.

Cause: This happens sometime when Service Pack installation completes successfully but certain scripts like sqlagentxxx_msdb_upgrade.sq mostly in the Service Pack will be applied only after the SQL Server service starts the next time.

Script upgrade means that when SQL is restarted for the first time after the application of the patch, the upgrade scripts are run against each system databases to upgrade the system objects. During this process, SQL Server attempts to create this mdf file in the default data location, and if the path is not available, then we get this error. Most of the time, it’s a result of the data having been moved to a different folder, and the original Default Data path being no longer available. The default data path can be checked from the following registry key (for a default SQL 2008 instance):

HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer

Workaround and Resolution

  • Wait for few more minutes after start of SQL Server Services, as it takes a little time to apply the script .Keep an eye on any error message in Windows event log and SQL Server error log. If everything is good then you would be able to connect.
  •  In one of the scenario the default location of the database was changed since its installation but the registry entry was still pointing to the default path folder whose structure was deleted from the disk. In this case you will get below error logged in the error log

Here SQL Server is picking up the default data drive location from Registry and trying to create temporary .mdf file which is necessary to complete the upgrade.

FIX:

To quickly resolve this issue we need to look into the registry path containing the default data path location and change it to existing one. This approach is more practical as we will not face the same issue while next patching activity otherwise you can create the missing folder structure on the drive.

HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer

Check the value for the String Entry named “DefaultData” and change the location to existing one .Restart the SQL Services and monitor Errorlog file.

Another scenario is when you have Utility control Point enabled in SQL Server 2008 R2 and Agent XPs disabled. This issue is fixed in SQL Server 2008 R2 CU2 but I included this here if in case this is the one you are facing.

This component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘Agent XPs’ by using sp_configure. For more information about enabling ‘Agent XPs’, see “Surface Area Configuration” in SQL Server Books Online.

FIX:

Below are the steps you need to follow in order to fix above error message,

Enable Trace Flag 902 to disable the script execution. Restart the SQL Services.

Make sure that SQL Agent Services are in stopped state.

Connect to SSMS and execute below commands

EXEC sp_configure ‘show advanced’, 1;

RECONFIGURE;

EXEC sp_configure ‘allow updates’, 0;

RECONFIGURE;

EXEC sp_configure ‘Agent XPs’, 1;

RECONFIGURE;

GO

Stop SQL Services and remove the trace flag 902. Start the services.

There could be several other reasons for the same.

http://support.microsoft.com/kb/2163980

https://connect.microsoft.com/SQLServer/feedback/details/416860/error-18401-after-starting-service-after-successfull-sp1-install

 

 

Advertisements

Error: Setup Support Rules failed with warning “Network Error Binding” Order while installing SQL Server 2008 Cluster

Error: Setup Support Rules failed with warning Network Error Binding Order while installing SQL Server 2008 Cluster

When you install a SQL 2008 cluster you can encounter above error “Setup Support Rule Failed” with warning Network binding error. You cannot move forward without passing this rule. When you check the cluster validation report you can found the below mention error

Error:

Network interfaces ServerName-Node1 – BackupLan and Servername-Node2  BackupLan are on the same cluster network, yet either address xxx.xx.xx.xx is not reachable from xxx.xx.xx.xxx or the ping latency is greater than the maximum allowed 500 milliseconds.

Network interfaces ServerName-Node1- BackupLan and Servername-Node2  – BackupLan are on the same cluster network, yet either address xxx.xx.xx.xx is not reachable from xxx.xx.xx.xx or the ping latency is greater than the maximum allowed 500 milliseconds.

Cause: The main root cause here is that during the Cluster Validation the connection between the 2 Backup LAN’s connections is not routable hence the cluster is not able to ping from one Backup LAN NIC to the other Backup LAN NIC and throws above error.

Resolution: Temporarily disable the Back LAN network connections on both nodes and proceed with the installation & then enable them again on both nodes

You can follow the below mentioned link for more details.

http://blogs.msdn.com/b/sqlserverfaq/archive/2010/04/23/network-binding-order-rule-warning-in-sql-server-2008-cluster-setup-explained.aspx

http://blogs.technet.com/b/sqlpfeil/archive/2012/05/21/network-bind-order-warning-during-sql-server-installation-at-failover-cluster.aspx

http://support.microsoft.com/kb/955963

Error: Application can’t be connected via SQL linked server (linked server from SQL 2008\2005 to SQL2000)

Error: Application can’t be connected via SQL linked server

The linked server stops working after up gradation of platform to 64 bit SQL Server 2005\SQL2008 which is firing queries on a 32-Bit SQL Server 2000 (applicable on SQL Server 7.0 as well)

ApplicationName can’t be connected via SQL linked server: [xxx.xxx.xxx.xx].[xxxxx].dbo

Resolution:

If your application is having some constraint and you think that it is risky to execute the complete instcat.sql script which wills actually upgrading the system stored procedure in master databases. Hence instead of running the complete script you can execute below mentioned stored procedure and the same procedure is called by 64-bit servers when running remote queries.

Make sure your account to connect is setup in the Linked Server and has appropriate permission

Solution 1

create procedure sp_tables_info_rowset_64

@table_name sysname,

@table_schema     sysname = null,

@table_type nvarchar(255) = null

as

declare @Result int set @Result = 0

exec @Result = sp_tables_info_rowset @table_name, @table_schema, @table_type
go

After executing the above script on the SQL 2000 server in master database the linked server would start working.

Solution 2

Moreover the issue can also be resolved by applying SP4 on SQL 2000 server, this solution is also recommended because it will also patch SQL 2000 server to the latest release, however a downtime is required for this solution (but is the safest solution).

How to check SQL Server Version and latest SQL server versions?

There are several ways to check the running SQL Server versions from Query Analyzer, command line, GUI and even by checking some binary file versions.

Select @@version

Go

___________________________________________________________________________________

Output= Microsoft SQL Server 2005 – 9.00.4035.00 (Intel X86)   Nov 24 2008 13:01:59   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Evaluation Edition on Windows NT 5.1 (Build 2600: Service Pack 3)

____________________________________________________________________________________

Moreover you can check it from the below mentioned queries, open query analyzer and execute the below command.

Select SERVERPROPERTY(‘ProductVersion’) AS ProductVersion,SERVERPROPERTY(‘ProductLevel’) AS ProductLevel,SERVERPROPERTY(‘Edition’) AS Edition,SERVERPROPERTY(‘EngineEdition’) AS EngineEdition;

GO

___________________________________________________________________________________

Output= 9.00.4035.00            SP3      Enterprise Evaluation Edition          3

___________________________________________________________________________________

3 = Enterprise (This is returned for Enterprise, Enterprise Evaluation, Data Center, and Developer.)

If you are bit reluctant 😉 to open query analyzer then fire a query then the version can also be checked from the server properties as mentioned below.

 

SP

There is also another way to check for SQL Server version is from the SQL Server Configura tion Manager. Go to configuration manager and click Advanced Tab, then you can check for file version and version of the running SQL Server.

CM

Sometimes if you have SCOM (System Centre Operation Manager) is monitoring your production server in your environment and you are getting still some alert that the SQL server version is not up to date even though it is updated, then you can check this from your SQLServr.exe version. To check this navigate to the location where your binaries are placed and then right click on SQLServr.exe file and check for Product version.

SQL

Note :- The SQL 2000 mainstream support was only available till April 08th 2008 and from then its extended support till April 09th 2013. If you need more details about this please follow the below mentioned Link by MS.
http://support.microsoft.com/lifecycle/?LN=en-us&x=14&y=10&p1=2852

Note :- The SQL 2005 mainstream support was only available till 12 April 2008 and from then its extended support till 12 April 2016. If you need more details about this please follow the below mentioned Link by MS.

http://support.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=SQL+Server+2005&Filter=FilterNO

You can also check the version and patch level of your SQL Server from register

SQL Server Default Instance (2000)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Setup

SQL Server Default Instance(2005)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Setup

SQL Server Named Instance (2008)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.ONE\Setup

Reg

 

Installation Issues with SQL Server 2005 on windows 2003\2008

You might have face several issues while installing SQL Server on the standalone server and on cluster, some of the errors are mentioned below; I hope this could help you in resolving some issues.

>>Error message when you install SQL Server 2005: “There was an unexpected failure during the setup wizard”

Most common error when you copy the setup files from the CD or from the network location to install your SQL Server and you encountered the below mentioned error as shown in RED

When you encounter this error first of all check for logs in location C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files and check for SQLSetupNumber_ServerName_Core(local).log and check for below mentioned error.

 Running: InstallToolsAction.10 at: 2006/4/8 16:46:2

Error: Action “InstallToolsAction.10” threw an exception during execution. Error information reported during run:Target collection includes the local machine.

Fatal Exception caught while installing package: “10”
Error Code: 0x80070002 (2)

Windows Error Text: The system cannot find the file specified. Source File Name: sqlchaining\sqlprereqpackagemutator.cpp

Compiler Timestamp: Tue Aug 9 01:14:20 2005

Function Name: sqls:: SqlPreReqPackageMutator::modifyRequest
Source Line Number: 196
—- Context ———————————————–
sqls::InstallPackageAction::perform
WinException caught while installing package. : 1603

Error Code: 0x80070643 (1603)

Windows Error Text: Fatal error during installation. Source File Name: packageengine\ installpackageaction.cpp
Compiler Timestamp: Fri Jul 1 01:28:25 2005
Function Name: sqls::InstallPackageAction::perform

This problem occurs because the folders that contain the files that are required during the installation of SQL Server 2005 do not have a correct layout.
To work around this problem, set the folders in the correct layout for the SQL Server 2005 installation.
The SQL Server 2005 installation uses the following two folders:
•           Servers
•           Tools
These two folders must be under the same level of a folder or the root folder of a drive. The names of these folders must be exactly Servers and Tools. The Servers folder contains all the files that are required to install major SQL Server 2005 components, such as database engine. The Tools folder contains tools components and Books Online for SQL Server 2005.
In this example, the D:\SQLServer2005 folder is the location to which you want to copy the files from the SQL Server 2005 installation CDs.
In the D:\SQLServer2005 folder, create the following two subfolders:
Servers & Tools

  1. Copy all the files from the SQL Server 2005 installation CD that is named Servers to the D:\SQLServer2005\Servers folder.
  2. Copy all the files from the SQL Server 2005 installation CD that is named Tools to the D:\SQLServer2005\Tools folder.
  3. Open the D:\SQLServer2005\Servers folder, and then double-click Setup.exe to start the SQL Server 2005 Setup program.

>>SQL Server took too much time than expected, sometime more than 24 hours

You could face a this issue when the primary domain has many external trust relationships with other domains, or when many lookups are performed at the same time, the time that is required to look up domain group names may increase significantly. Therefore, the time that is required to install SQL Server 2005 may also increase. To resolve this issue MS has suggested a hotfix below is the link to resolve this issue.
http://support.microsoft.com/kb/910070
I have also face similar kind of issue with SQL server 2008 Edition, however for me Slipstream setup worked. To know more about slipstream setup, you have to check my blog “How to slipstream SQL Server 2008 setup”

 >> On a computer that has a multicore processor, you may be unable to install SQL Server 2005

 When you are installing SQL server 2005 on a server and every time the installation get failed in the last when setup trying to start your SQL Services, when you analyze the error log in %ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG you find the below mentioned error
Unable to start service (1053)
Error Code: 0x8007041d (1053)
Windows Error Text: The service did not respond to the start or control request in a timely fashion.
This situation can be True in case of below mentioned conditions.
1.     The ratio between logical processors and physical sockets is not a power of 2. For example, the computer has a single socket together with a triple-core processor.
2.     The number of physical cores is not a power of 2.
3.     The total number of CPUs is an odd number. For example, there are seven or nine CPUs.

There were 2 workaround to resolve this issue one is to change the NUMPROC value to 1 in boot.ini advanced configuration, and the other method is to extract the SP and run the setup using command line along with this Hotfix, for more details follow the below mentioned link suggested by MS.
http://support.microsoft.com/kb/954835

>>After you install SQL Server 2005, the full-text search service cannot start

This issue occurs when you install SQL Server 2005 on Windows Server 2008 and the full text service fails to start, this problem occurs because the NTLM Security Support Provider (NTLMSSP) service does not exist on Windows Server 2008. However, the full-text search service depends on the NTLMSSP service. However the workaround is very simple to resolve this issue you have to install SQL Server 2005 SP2.
>> All resources did not come online and therefore you will need to manually set the cluster restart option
This issue occurs when you install SQL Server 2005 on Windows Server 2008 failover cluster and you receive this error message “All resources did not come online and therefore you will need to manually set the cluster restart option”.
This error occurred because full text service fails to start, this problem occurs because the NTLM Security Support Provider (NTLMSSP) service does not exist on Windows Server 2008. However, the full-text search service depends on the NTLMSSP service. However the workaround is very simple to resolve this issue you have to install SQL Server 2005 SP2.

 

>> The setup has encountered an unexpected error while Completing Commit. The error is: The cluster resource cannot be made dependent on the specified resource because it is already dependent.
Consider a scenario in which you have an existing SQL Server 2005 clustered instance installed on Windows server 2008, and you try to perform any of the following operations by using setup.exe:
1.     Edition upgrade
2.     Change server collation
3.     Rebuild system databases

You will get the below mentioned error in case any of the above operation performed “The setup has encountered an unexpected error while Completing Commit. The error is: The cluster resource cannot be made dependent on the specified resource because it is already dependent”
This error occurred because there is a known compatibility issue with SQL 2005 Setup and Windows Server 2008 Failover cluster. Setup tries to add the network name or the shared disk as a dependency to the SQL Server resource, and this fails because the dependency already exists.
There is no workaround available for this issue. At the time of the most recent update to this article, SQL Server 2005 is in extended support phase, and this issue will not be fixed in this release. If you have to perform any of the actions mentioned above, you will have to uninstall the existing instance of SQL Server and reinstall it with the new edition/collation changes.

SQL Server 2000 Installation Issues & Workaround

Error: A previous program installation created pending file operations on the installation machine. You must restart the computer before running setup

Restart the computer and see if you are able to run the setup. If the restart does not help, use the steps that follow.
1. Perform these steps and then run the SQL Server 2000 setup again:
a. Click Start, and then click Run.
b. In the Open dialog box, type: “Regedit” (without the quotation marks) or “Regedt32” (without the quotation marks)
c. Click OK.

NOTE: Please make sure that you only delete the value mentioned, not the whole session manager key.
d. In Registry Editor, expand the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
e. On the File menu, click Export.

NOTE: In Microsoft Windows 2000, click Export Registry File from the Registry menu.
f. In the File name text box, type: “Session Manager Key” (without the quotation marks)
g. Click Save.
h. In the right-pane of the Registry Editor window, right-click PendingFileRenameOperations. On the shortcut menu that appears, click Delete.
i. In the Confirm Value Delete message dialog box that appears, click Yes.
j. On the File menu, click Exit.

NOTE: In Windows 2000, click Exit on the Registry menu.
k. Restart the computer.
l. Using the Registry Editor, verify that the PendingFileRenameOperations registry value is not available.

Note The PendingFileRenameOperations registry value may be re-created when you restart the computer. If the registry values are re-created, delete the PendingFileRenameOperations registry value again by completing steps a through j, and then run SQL Server 2000 Setup. Do not restart the computer before you run SQL Server 2000 Setup.
2. Check other control set keys (for example, ControlSet001, ControlSet002, and so forth) for the same values and also delete them.
3. Identify the virtual memory settings on the computer. If the paging file is too small or if there is no paging file, this error message may occur at startup:
Limited Virtual Memory Your system has no paging file or the paging file is too small.
If the error message occurs, determine the placement of the paging file from the virtual memory settings and give that drive full permissions for the system account.

Error: Unable to install MSDTC during setup up

MS DTC on computers with multiple network cards could affect this configuration hence, MS DTC cannot be installed on a server with multiple network cards, uninstall one of the network cards, and then retry the SQL Server Setup. This should work and setup will run successfully

Error: SQL Server Setup failed while installing services

Please make sure that if the setup failed and there is a SQL instance installed earlier then you must delete the below mentioned registry key for starting the installation again.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SQLServerAgent HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

Error: Rule “SQL Server Database Services feature state” failed

While Installing SQL 2008 cluster installation after installing on one node when trying to add a failover cluster node in the “add Node Rules” I get following message:
—————————
Rule Check Result
—————————
Rule “SQL Server Database Services feature state” failed.

The SQL Server Database Services feature failed when it was initially installed. The feature must be removed before the current scenario can proceed.
Resolution: Please follow the below mentioned steps to resolve this issue.

Change registry key on active node:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL\  Server \ MSSQL10.BENEDICT\ConfigurationState
Change all 4 values from 2 to 1

Download and extract the service pack by running the following command:

SQLServer2008SP2-KB979450-x64-ENU.exe /x:C:\SP2

Run: C:\SP2\x64\setup\1033\sqlsupport.msi

Run from source media:
Setup.exe /PCUSource=C:\SP2 /SkipRules=Cluster_IsDomainController Cluster_VerifyForErrors /Action=AddNode

The solution works after making changes in registry key  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.BENEDICT\ConfigurationState
Change all 4 values from 2 to 1