Friday, May 18, 2018

SQL Cluster Registry Checkpoint

Error
[sqsrvres] GetRegKeyAccessMask: Could not get registry access mask for registry key Software\Microsoft\Microsoft SQL Server\MSSQL10.HA5\Replication (status 2)).



Fix - Populate the registry to the other node

https://www.mssqltips.com/sqlservertip/3440/registry-check-pointing-in-a-windows-cluster-to-bring-sql-server-online/

https://sqlserver-help.com/2015/04/17/information-checkpoint-in-sql-server-cluster-resources/

> cluster res /checkpoints

Find your resource name to replace below
Run in cmd (Admin)

cluster res "SQL__YKF" /addcheck: "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.HA5\Cluster" 
cluster res "SQL__YKF" /addcheck: "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.HA5\MSSQLServer" 
cluster res "SQL__YKF" /addcheck: "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.HA5\Replication" 
cluster res "SQL__YKF" /addcheck: "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.HA5\Providers" 
cluster res "SQL__YKF" /addcheck: "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.HA5\SQLServerSCP" 
cluster res "SQL__YKF" /addcheck: "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.HA5\CPE" 
cluster res "SQL__YKF" /addcheck: "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.HA5\SQLServerAgent"


Tuesday, April 17, 2018

2008 Cluster install fails on newer Windows 2012/2016

Tried to install SQL 2008 R2 on Windows 2016 = fails, cluster verification fails
SQL 2014 was a-okay

PowerShell (Admin mode)
Install-WindowsFeature -Name RSAT-Clustering-AutomationServer

Error to install SQL Server 2008 on Windows 2012 – Marcelo's Spaces
https://marcelodba.wordpress.com/2014/08/17/error-to-install-sql-server-2008-on-windows-2012/

https://manjusullad.wordpress.com/2015/11/26/unable-to-install-sql-2008-on-windows-server-2012-failover-cluster/

Tuesday, August 15, 2017

SQL Server 2008 Add Cluster Node workarounds

I haven't installed/added SQL 2008 cluster node for so long, but just today I had to use 2 workarounds just to get it working. Whew

First workaround, Cluster Validation was good but SQL installer still complained
https://support.microsoft.com/en-ca/help/953748/error-message-when-you-install-sql-server-2008-on-a-windows-server-200

Setup /SkipRules=Cluster_VerifyForErrors /Action=AddNode


Second Workaround is actuall a MS Bug, where I had to comment out the pre-saved license key in the installer folder and entered it manually instead
https://digitaljive.wordpress.com/2009/06/22/%E2%80%9Cthe-current-sku-is-invalid%E2%80%9D-when-adding-second-node-to-sql-2008-cluster/

https://support.microsoft.com/en-nz/help/957459/fix-error-message-when-you-try-to-add-a-second-node-to-a-sql-server-20

Basically go to \x64 folder and modify the Defaultsetup.ini file to comment out the serial number (and paste it in during install)
;SQLSERVER2008 Configuration File
[SQLSERVER2008]
;PID="XXXXXXXXXXXXX"

Wednesday, November 26, 2014

Set DEADLOCK_PRIORITY to update Database in Single_User mode


If you need to access a Database in Single_user mode, to either take it offline or change to MULTI_USER, change the DEADLOCK_PRIORITY so your process does not get picked as deadlock victirm.

SET DEADLOCK_PRIORITY HIGH
--KILL 58   -- kill the session using the database
ALTER DATABASE [DB_NAME] SET OFFLINE WITH ROLLBACK IMMEDIATE
--ALTER DATABASE [DB_NAME] SET MULTI_USER WITH ROLLBACK IMMEDIATE
SET DEADLOCK_PRIORITY NORMAL