Help: SQL Server

Sharing my knowlege about SQL Server Troubleshooting Skills

  • Blog Stats

    • 2,153,602 hits
  • Select GETDATE()

    December 2025
    M T W T F S S
    1234567
    891011121314
    15161718192021
    22232425262728
    293031  

Archive for the ‘Installation’ Category

Solution : Cannot add new node – Rule "SQL Server Database Services feature state" failed.

Posted by blakhani on September 11, 2014


While deploying SQL Server 2014 cluster in my lab I ran into this problem when I was trying to add second node (Node 2) to SQL cluster.

—————————
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.
—————————
OK
—————————

Above error means that when I installed SQL Server on first cluster node, it didn’t install properly. There were some errors while creating cluster and due to that AddNode is blocked. In my case also this is true because I had an issue with SQL Server Network Name Resource and it didn’t come online earlier. Below was the original error on Node 1

Cluster network name resource ‘SQL Network Name (Balmukund)’ cannot be brought online. The computer object associated with the resource could not be updated in domain ‘MyDomain.com’ for the following reason:
Unable to update password for computer account.

The text for the associated error code is: Access is denied.

The cluster identity ‘WinCluster$’ may lack permissions required to update the object. Please work with your domain administrator to ensure that the cluster identity can update computer objects in the domain.

I fixed above error by giving proper permission to cluster computer object on Balmukund (which was the network name of SQL) After fixing that I created SQL Server and SQL Agent manually. Sometime it may also happen that SQL Agent didn’t come online on Node 1 due to some failure and it was fixed after setup was completed.

So, if we see above rule failure then we should go to the first node and check setup log files to see if the installation succeeded or failed. If the first node installation had some failures which were fixed later then we should do a repair of the installation. Repair option can be found under the "Maintenance" page in SQL Server Installation Center (setup).  This action will clear the failure state and allow the node addition action.

If you are lazy like me to do repair then you can also check registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12.SQL2014\ConfigurationState

If you see value as 2 for any component then there were some failures of those components. In most of the cases since issue would be with SQL Server or SQL Agent, we might see 2 for MPT_AGENT_CORE_CNI, SQL_Engine_Core_Inst, SQL_FullText_Adv, SQL_Replication_Core_Inst

Note: that we MUST fix the error on first node before taking shortcut of registry value. Once error is fixed, we can make the value of those component to 1 (means success)

The highlighted value MSSQL12.SQL2014 might vary based on SQL version and Instance name. The first piece for SQL 2008 it would be MSSQL10, for SQL 2008 R2 it would be MSSQL10_50, for SQL 2012 it would be MSSQL11 and for SQL 2014 it would be MSSQL12. Second piece is instance name (for me instance name is SQL2014)

Hope this helps!

  • Cheers,
  • Balmukund Lakhani
  • Twitter @blakhani
  • Author: SQL Server 2012 AlwaysOnPaperback, Kindle
  • Posted in Installation, Troubleshooting | Tagged: , , , | 2 Comments »

    Step by Step – Configuring SQL Server 2012 AlwaysOn in Windows 7 Virtual Environment (Part 1)

    Posted by blakhani on May 3, 2012


    I have been demonstrating AlwaysOn feature to various audiences on various forums (TechEd, SQL Saturday, Virtual TechDays etc.). I have been using Windows Server 2008 R2 with Hyper-V to create multiple machine and demonstrate the feature. Someone asked me if he can do the same thing using his Windows 7 laptop? I tried looking at virtualization techniques available on Windows 7 and I found that it should be possible. I have tried to make it as descriptive as possible with step by step screenshots to configure whole setup.This topic would be a multipart series.

    1. Configure Windows 7 to use Virtualization and Configure three machines (One domain controller, two member servers). Also configure networking between them.
    2. Create Domain and configure the machines to make sure they are able to talk to each other.
    3. Install SQL Server 2012 on the servers.
    4. Configure AlwaysOn.

    First download Windows Virtual PC on Windows 7 machine. Go to http://www.microsoft.com/windows/virtual-pc/download.aspx and choose below option. I am not going to Install Windows XP mode.

    01_VPC

    One clicked, choose your platform and language and click on download button.

    02_VPC

    This would install Windows Update to enable Virtual PC

    03_Windows Installer

     

    Restart the machine and you should be able to see below under "Start” > “Programs” > “Windows Virtual PC”

    04_Windows Virual PC Shortcut

    Next step would be to download the Virtual Hard Disk (a.k.a. VHD) file which I can use to configure my machine. Note that You need to use 32 bit images to make this work. Here is the link to download Windows Server 2008 images http://www.microsoft.com/en-us/download/details.aspx?id=14527 (Windows Server 2008 Enterprise Edition x86 (Full Install) VHD)

    There are three parts which you need to download and then extract to user by Virtual PC. It would look like below.

    05_Downloaded VHD

    Double Click on the File and Extract the data into “C:\VHDs\DC” folder as shown below:

    06_Extract

    Once extraction is complete, make three copies of the vhd (Windows2008Fullx86Ent) file and keep them in separate folders as shown below. [I am showing only two, same exists for Srv2 also]

    07_Copies

    Lets add the machine to Virtual PC. Open the UI from "Start” > “Programs” > “Windows Virtual PC” > “Windows Virtual PC” and choose “Create virtual machine”

    08_Create Machine 

    Follow the wizard and create DC

    09_Create Machine1 

    10_Create Machine_Mem

    11_Create Machine_Disk

    One done, lets go to network setting and choose “Internal Network” This is because I don’t want to create domain controller in my office domain network.

    Right Click on DC and choose “Settings”

    12_Setting

    Go to Networking option and choose “Internal Network”

    13_Setting_Network

    Now start the first machine and make sure we are able to log in.

    14_DC_Startup

    You need to follow few steps which are pretty self-explanatory. It would also as you to set machine name (I have given name as DC) new password for Administrator. Once you are done with that, this is what you should see 🙂

    15_DC_LoggedIn

    As homework, before moving to second part, you need to do the same thing with two more machines and here is what you should see in Windows Virtual PC.

    16_Three Machines

    See you at next part of Series!

    Hope this would help someone in the world!

    Cheers,
    Balmukund Lakhani
    Twitter @blakhani

    Posted in AlwaysOn, Denali, Images, Installation, Installation Guide, Introduction, screen shot, Screenshot, SQL Server 2012, Step by Step | 4 Comments »

    Help: Getting Visual Studio Service Pack Error while installing SQL Server 2012 Release Candidate 0 (RC0)

    Posted by blakhani on December 8, 2011


    To make my AlwaysOn demo up-to-date with latest release, I uninstalled SQL Server 2012 (a.k.a. Denali) CTP3 from my machine(s) and and started to install SQL Server 2012 RC0.

    Setup started fine and later after doing feature selection and then I received this error. Interestingly I didn’t receive error another machine both were made from same image.

    01_VSErrorBlog

    Here is the text of the error message for better search.

    —————————
    Rule Check Result
    —————————
    Rule "Prior Visual Studio 2010 instances requiring update." failed.

    This computer has an installation of Visual Studio 2010 that requires a Service Pack 1 update that is needed for a successful installation of SQL Server based on your feature selection. To continue, install the required Visual Studio 2010 Service Pack 1 from SQL Server media or from http://go.microsoft.com/fwlink/?LinkID=220649.
    —————————
    OK  
    —————————

    one might ask, I don’t have Visual Studio product installed, why do I get this error. Well, SQL Server Tools (SSMS, BIDS) uses Visual Studio Shell. But, I thought that why setup didn’t do this check on earlier screens. Later, looking at the code I realized that we do this check if we install components which need Visual Studio Shell (like SQL Server Management Studio)

    Here is the public proof of my theory from setup logs. You will also understand what all we check over here.

    <Detail.txt>
    (07) 2011-12-07 22:46:51 Slp: Loading rule: DEV10RTMDetected
    (07) 2011-12-07 22:46:51 Slp: Creating rule target object: Microsoft.SqlServer.Configuration.SetupExtension.DetectInstalledProductsFacet
    (07) 2011-12-07 22:46:51 Slp: Rule applied features  : BIDS;SSMS

    (12) 2011-12-07 22:46:51 Slp: Init rule target object: Microsoft.SqlServer.Configuration.SetupExtension.DetectInstalledProductsFacet
    (12) 2011-12-07 22:46:51 Slp: Package ID VSIntShellRTM_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSIsoShellRTM_Cpu32: Installed – Version: 10.0.30319
    (12) 2011-12-07 22:46:51 Slp: Package ID VBExpress_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VCSExpress_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VCExpress_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID WPExpress_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSPremium_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSPro_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSTE_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSUltimate_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSLabAgent_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSTestAgent_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VSTestController_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: Package ID VWDExpress_Cpu32: NotInstalled
    (12) 2011-12-07 22:46:51 Slp: The package ‘VSIsoShellRTM_Cpu32’ is installed.
    (12) 2011-12-07 22:46:51 Slp: Rule ‘DEV10RTMDetected’ detection result: AreAnyProductsInstalled= True
    (12) 2011-12-07 22:46:51 Slp: Evaluating rule        : DEV10RTMDetected
    (12) 2011-12-07 22:46:51 Slp: Rule running on machine: ALWAYSON-SRV4
    (12) 2011-12-07 22:46:51 Slp: Rule evaluation done   : Failed
    (12) 2011-12-07 22:46:51 Slp: Rule evaluation message: This computer has an installation of Visual Studio 2010 that requires a Service Pack 1 update that is needed for a successful installation of SQL Server based on your feature selection. To continue, install the required Visual Studio 2010 Service Pack 1 from SQL Server media or from http://go.microsoft.com/fwlink/?LinkID=220649.
    </Detail.txt>

    DEV10RTMDetected is the rule name and it would fire only if you select BIDS and/or SSMS, we would fire the rule and block installation on failure. Now why it did not come on another machine because I didn’t select tools there.

    Okay, now you may ask – what I need to do now? Well, have a look at error message. It tells you the action needed. So here are the solutions.

    • Go to http://go.microsoft.com/fwlink/?LinkID=220649 and download SP1. As per note on the link

      ”This web installer downloads and installs Visual Studio 2010 Service Pack 1. An Internet connection is required during installation”

    • Other better way is to use the setup media. Yes, you read is correctly, SQL Server 2012 RC0 setup media. Below is the location of the package to install Visual Studio 2010 SP1

     
    02_VSErrorBlog

    Once you start installing this patch, below is what you would see.

    03_VSErrorBlog

    If you have not cancelled the setup after seeing the message, you can use “Re-run” button to run the check again

    04_VSErrorBlog 

    And you are green!!

    05_VSErrorBlog

    Now, go ahead with the setup and post a comment here if this helped.

    Cheers,
    Balmukund Lakhani
    Twitter @blakhani

    Posted in Denali, Error, Installation, RC0, screen shot, Screenshot, SQL Server 2012, SQL Server RC0, Visual Studio | 56 Comments »