Category: Database Connection

  • Powershell Function to Get SQL Server’s Network Protocols

    [sourcecode language=”powershell”] #Function to get SQL Server network protocols Function Get-SQLProtocols { Param([String]$ComputerName = $env:COMPUTERNAME) [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | out-null $Server = New-Object "Microsoft.SqlServer.Management.Smo.Server" $ComputerName $VersionMajor = $Server.VersionMajor Get-WmiObject -ComputerName $ComputerName -NameSpace root\Microsoft\SqlServer\ComputerManagement$VersionMajor -Class ClientNetworkProtocol | Select-Object ProtocolName, ProtocolDisplayName, ProtocolOrder }#End of function [/sourcecode] The output of the above function usually looks like this: ProtocolName ProtocolDisplayName ProtocolOrder sm Shared Memory 1 tcp TCP/IP…

  • Workaround to Register an Instance Out of Your Domain in Central Management Server

    It sucks that Central Management Server (CMS) doesn’t support registering an instance by SQL Server authentication (and unfortunately in very DBA’s inventory, there are always a few servers that are out your normal domain but you still have to manage). Here is a workaround posted by David Samson on Brent Ozar’s blog post about how…