SqlServerDsc icon indicating copy to clipboard operation
SqlServerDsc copied to clipboard

SqlSetup: Not supporting having tempdb on local disk for cluster install when SQL Server is 2012 an above

Open johlju opened this issue 7 years ago • 1 comments

Details of the scenario you try and problem that is occurring: When doing a cluster install using SQL Server 2012 and above it is supported to have tempdb on local disks (instead if shared disks for older versions of SQL).

See article: https://logicalread.com/sql-server-tempdb-best-practices-placement-w01

The DSC configuration that is using the resource (as detailed as possible): Configuration from issue #484

xSQLServerSetup ($Node.NodeName)
{
    Action  = "InstallFailoverCluster"
    InstanceName  = "MSSQLSERVER"
    SetupCredential = $Credential
    SourcePath  = "c:\users\public\downloads\sql2016\source\" 
    Features  = "SQLENGINE, REPLICATION, FULLTEXT, DQ"
    InstanceID  = "MSSQLSERVER"
    UpdateEnabled  = "True"
    UpdateSource  = "MU"
    InstallSharedDir  = "c:\Program Files\Microsoft SQL Server\"
    InstallSharedWOWDir  = "c:\Program Files (x86)\Microsoft SQL Server\"
    InstanceDir  = "C:\Program Files\Microsoft SQL Server\"
    SQLSvcAccount  = $SQLSvcAccount
    AgtSvcAccount  = $AgtSvcAccount
    SQLCollation  = "SQL_Latin1_General_CP1_CI_AS"
    SQLSysAdminAccounts   = "$SQLAdmin"
    SecurityMode  = "SQL"
    SAPwd  = $SACreds
    InstallSQLDataDir  = "W:\sql\binaries"
    SQLUserDBDir = "W:\SQL\Data\COMMON"
    SQLUserDBLogDir = "W:\SQL\Logs\LG_COMMON"
    SQLTempDBDir = "H:\SQL\Data" # Local disk
    SQLTempDBLogDir  = "H:\SQL\Logs" # Local disk
    FailoverClusterGroupName  = "$FailoverClusterGroupName"
    FailoverClusterIPAddress  = "$FailoverClusterIPAddress"
    FailoverClusterNetworkName  = "$FailoverClusterNetworkName"
    PsDscRunAsCredential = $Credential

}

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running: SQL Server 2012 and above

Version of the DSC module you're using, or 'dev' if you're using current dev branch: Dev

johlju avatar Apr 12 '17 05:04 johlju

This might be a little off-topic fot his git, but there is a caveat here... if the local disk with the tempdb fails, SQL will not initiate a failover.

My colleague Twan and I have written an article detailing that on https://www.sqlservercentral.com/articles/do-not-place-tempdb-on-a-local-disk-in-a-sql-failover-cluster

TLDR: you need to check in SQL for the loss of the local disk, and initiate the failover yourself.

ekelmans avatar Jan 05 '21 12:01 ekelmans