Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

PowerShell to Pre-Create domain objects for SQL Server Cluster

By Fahim Ahmad,

As a DBA, you probably nod dissaprovingly when a vendor or a developer claims they need [sysadmin] priviledges on your SQL Instance in order for their code or product to work.  I have also seen this look on the face of many domain admins (DA) when they are approached by the DBA who claims they need full create, edit, delete, property change rights on the main Computers OU in the corporate Active Directory, because SQL Clustering requires it.  If this is you, brace yourself for a disapproving nod from your DA.

My preferred alternative, one shared by my DA is to create a separate OU in the Active Directlry for all SQL Cluster related objects [ex: SQLCLuster], and let the DA pre-create the computer  objects.  Your only job is to establish all the names you intend to create during the installation of your SQL Cluster.

My personal naming convention for creating Computer Objects to support a SQL Cluster are:

  • SQLPRODc01
  • SQLPRODc01-fs1
  • SQLPRODc01-sql08
  • SQLPRODc01-DTC1
  • SQLPRODc01-sql08r2
  • SQLPRODc01-DTC2
  • SQLPRODc01-sql12
  • SQLPRODc01-DTC3

This script will allow the Domain Admin to create the OU if it does not already exist, and then create the computer object (one per run)  and place it into that OU.  

It is imperative that the new computer object is created as DISABLED (this is taken care of in this script), because when you eventually create the clustered resource in windows, it will look for the unused computer object with a specified name to revive and claim to complete its setup.

It is also crucial that the Domain Admin manually affect the permissions of the created objects.  Once the main cluster computer account (SQLPRODc01$) is created, it needs to be added to the subsequent computer Security tab with FULL CONTROL on all subsequent objects related to that cluster.  I could not elegently script a solution to automate this; any help or enhancements are welcomed.

Total article views: 351 | Views in the last 30 days: 6
 
Related Articles
SCRIPT

PowerShell to search for domain Computer objects

Query Active Directory Computer objects to verify existence

FORUM

Using computed Columns to Create another Computed Column

Using computed Columns to Create another Computed Column

FORUM

cluster

cluster

FORUM

SQL Server service running under non admin account in cluster environment

Make SQL Server run with non admin account on cluster server.

FORUM

SQL Server 2005 - Running on Windows 2003 Compute Cluster Server

Runnig SQL Server on Windows 2003 Compute Cluster

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones