How to automate Sql Server Configuration Manager settings

19 May,2015 by Jack Vamvas

Question: I’ve installed SQL Server 2012. I’d like to enable TCP\IP for a port number.  Normally I open SQL Server Configuration Manager | SQL Server network Configuration | Protocols for MYINSTANCE | Select TCP\IP.

Rather than manually going through the process for every server, I’d like to script this step as part of the Installation and Configuration. What methods are available ?

Answer: It is possible to script these steps. I use two reliable methods. Method 1 uses the built-in SQL Server installation switches . Method 2 uses Powershell

 

Method 1 – Install SQL Server and use the /TCPENABLED = 1 switch.

You can add this switch to an installation sequence. This method is useful if you are automating silent installs read more on How to Install SQL Server service pack silently

Method 2 – Use a powershell script to enable TCPIP

As part of a post installation task use a powershell script to initialize the Microsoft.SqlServer.Management.Smo namespace . Once initialized you can access the various functions to firstly establish the current status of TCP\IP (IsEnabled)  and secondly alter the status from false to true.(Alter()).

Applying scripted , repeatable methods of SQL Server configurations has a big impact on DBA productivity

 

Read more on automation, silent installs and DBA mistakes

SQL Server DBA Top 10 automation tasks

SQL server 2008 R2 – Silent installation for the SSMS and client tools

SQL Server - Top 10 DBA mistakes - SQL Server DBA

 

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to automate Sql Server Configuration Manager settings


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer