Wednesday, 8 August 2012

Important Checklist to Install SQL Server 2008 R2 Failover Cluster on Windows 2008 R2 Failover Cluster

   
Preparing server from scrap.. lemme prepare the checklist first..
in a nutshell...
  1. Configure RAID – for OS redundancy make sure disks are on raid 1 or 5 selection.
  2. Install Windows Server 2008 R2 Ent Edn.
  3. Register OS online
  4. Install latest patches including SP1 available at the moment.
  5. Change the windows updates schedule.. Change settings and choose download updates but let me choose whether to install them. This way it would be a controlled restart.
  6. Join node to domain
  7. Install Anti-Virus
  8. If using SAN Storage to present the storage disks to the server you may need to download and install HP MPIO Full Featured DSM for P6x00 family for Disk Arrays. This will present the EVA 4400 SAN Storage Disk to the Server. Or use free iscsi storage initiators see this one.  Present it to the server. Format (ntfs) the newly created disk drives. Total 4 drives preferably. i) for Quorum (max 1GB enough),  ii) for MSDTC (max 1GB enough), iii) for Log Volume, iv) for Data Volume.
  9. Create a cluster account and add to domain admin group.
  10. Node1: Add Features Failover Clustering
  11. Go to network connections and disable not in use network adapters. Select detailed view and disable netbios on heartbeat network of each nodes. Go to network properties>>ipv4 properties>>advanced>>wins>>disable NetBIOS over TCP/IP.
  12. Node1&2: Add Application Server Role  and Distributed Incoming Remote and Outgoing Remote Transaction Role and .net framework 3.5.1 feature from Server Manager.. if required make sure non-http activation is selected which is used for WCF activation.
  13. Refer Security considerations before & after SQL Server Installation
  14. SQL 2008 R2 – proceed with system configuration checker
  15. Avoid SQL server setup run from remote share.. copy the ISO image locally and run the setup. installation will be faster this way. if required download ISO magic disc for accessing ISO images.
  16. Install SQL, option: New SQL server failover cluster installation .. Point Data Drive to S.. Point Log Drive to L: If skipped you can do this at a later stage from
  17. Add mix mode authentication..
  18. Setup preferred Cluster Node to the more powerful server (say cluster node 1 has more memory, so make it as the preferred owner).
  19. Group Policy inclusion.. refer automatic restart of service accounts i) Log on as a batch job, ii) Log on as a service, iii) Act as part of the operating system
  20. Present disable non present network drivers.
  21. Enable windows firewall and include only required tcp port
  22. Install SQL to the second node. .option: add node to a SQL server failover cluster
  23. Segregate SQL service account  and include the domain service account credentials for each service. note that passwords are changed once in 3 months (production servers only) or based on companies IT policy. 
  24. If you want SQL named instance on this failover cluster then at this point select the option 1 from SQL setup: "new installation or add features to an existing installation".  At command prompt type ssms (for SQL 2008 onwards) or sqlwb (for SQL 2005) and check the connections. You may remotely check the connection by typing "telnet servername port" (default 1433).
  25. Finally remove internet access from SQL server to minimize external threats.



The credentials you provided during SQL Server 2008 installation are invalid

When providing service accounts and passwords you might encounter one of the following error messages, which prevents you from continuing the installation:
- The credentials you provided for the SQL Server Agent service are invalid. To continue, provide a valid account and password for the SQL Server Agent service.
- The specified credentials for the SQL Server service are not valid. To continue, provide a valid account and password for the SQL Server service.



Solution: you may select NT AUTHORITY\SYSTEM and proceed. Later you can change the SQL service account with a dedicated domain service account meant for starting the service.
you can also provide the account with specific roles, like local admin, domain user/ admin based on org. and application specific requirement.



Recommendation:

Automatic restart of Service Accounts
Always make sure that if you are using domain account for running the SQL service, that account needs to be part of following 3 main resultant policies (you might have to do this from AD Group Policy to automatically reflect to the joined servers):

i) Log on as a batch job
ii) Log on as a service
iii) Act as part of the operating system

This will make sure that the account with which the SQL services run are automatically started after each system reboot.

Pre-requisites for SQL 2008 R2 Failover Cluster setup: MSDTC Setup

Microsoft Distribution Transaction Cordinator  setup process:
now proceed with SQL system configuration checker on node 1.
make sure the system configuration checker gets a clean result.
now proceed with New SQL Server failover cluster installation.

SQL 2008 pre-requisites: Determine and Set the Primary NIC on a Windows 2008 Server

NIC Binding is the order at which windows loads the NIC's at boot up and takes the first one as a primary NIC.

How to Determine and Set the Primary NIC on a Windows 2008 Server

  1. Open Network Connections. You may also type shortcut ncpa.cpl from command prompt to open network connection.
  2. Press ALT key (dont hold, another list of menus will show up) Click advanced then click Advanced Settings
  3. Click the adapters and bindings tab, then under connections, click the connection you want to modify
  4. under the binding for connection, you can move the protocol up or down for the connection you have selected at the top

Validation errors while installing SQL 2008 R2 on Node 2 Cluster

The errors what I encountered while validating on SQL node 2.
Before I proceed with Node 2 installation, windows 2008 failover cluster perfectly does the failover transitions. SQL Node 1 installation successfully installed.
available online resources while proceeding to SQL node 2 (analysis service graph)
MSDTC path.
"
Validating cluster resource SQL Server (GP_PROD).
This resource is configured to run in a separate monitor. By default, resources are configured to run in a shared monitor. This setting can be changed manually to keep it from affecting or being affected by other resources. It can also be set automatically by the failover cluster. If a resource fails it will be restarted in a separate monitor to try to reduce the impact on other resources if it fails again. This value can be changed by opening the resource properties and selecting the 'Advanced Policies' tab. There is a check-box 'run this resource in a separate Resource Monitor'.
"
However the over all result showed, "Testing has completed successfully. The configuration appears to be suitable for clustering. However, you should review the report because it may contain warnings which you should address to attain the highest availability".
This warning message goes off after installing the SQL 2008 R2 on node second.

Adding SQL Node 2 Cluster services (MSCS) verification error

Error Code 0x80071398
Error..! never mind.
I evicted the node from the cluster and re-added it. Validate the cluster. It worked. Reboot when in question.
reinstall the SQL failover cluster on node 2.
I'm thrilled as failover cluster is awesome and religiously working fine. This is now my first step forward to the new infrastructure for SQL 2008 R2 consolidation project. Redundancy at its par.

Tuesday, 7 August 2012

Problem installing SQL Server 2008 R2 Failover Cluster on Node 2

Exception from HRESULT: 0x80070006
HRESULT: 0x80070006 (E_HANDLE)) ---> System.Runtime.InteropServices.COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE)). noted in SQL Server 2008 versions.
The problem rarely occurs in a row. So restart the server. Restart the SQL node two installation.
you can also try removing the traces of SQL installation from the second node and then try setup again. This time it should go.
for SQL instance removal failure try SQL installed instance removal