19 May,2015 by Tom Collins
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
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
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
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
This is only a preview. Your comment has not yet been posted.
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.
Posted by: |