LitKnd / littlekendracomments

1 stars 0 forks source link

Post: How to Enable Tcp/Ip in SQL Server Developer Edition, even if the Configuration Manager is Missing #24

Open LitKnd opened 3 years ago

LitKnd commented 3 years ago

Comments entered here will automatically show up at https://www.littlekendra.com/2021/05/05/how-to-enable-tcpip-in-sql-server-even-if-configuration-manager-is-missing/

potatoqualitee commented 3 years ago

Hey, cool! This is on GitHub. I wonder if pics work. If so, I discovered that Config is always in Computer Management, down at the bottom!

image

LitKnd commented 3 years ago

Whaaattttt, that's awesome!

I updated the post with this option to make sure people see it even if they don't scroll down. Thanks @potatoqualitee !

spaghettidba commented 3 years ago

When configuration manager disappears I dig it out of c:\windows\system32\SQLServerManager**.msc Upgrading or patching windows 10 is particularly efficient at hiding configuration manager :(

kaysauter commented 3 years ago

Really cool!

andreasjordan commented 3 years ago

You could also try using SQL Server SMO and WMI:

$computerName = 'SRV1'
$instanceName = 'SQL2019'
$serviceName = 'MSSQL$SQL2019'

$wmi = [Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer]::new($computerName)
$wmi.ServerInstances[$instanceName].ServerProtocols['Tcp'].IsEnabled = $true
$wmi.ServerInstances[$instanceName].ServerProtocols['Tcp'].Alter()
$wmi.Services[$serviceName].Stop()
$wmi.Services[$serviceName].Start()