How can I check whether port 1433 is open for Sql Server or not? I have set in bound and out bound rules, checked in SQL config manager but not sure whether it is working.
If TELNET is installed, you could use TELNET 1433
to verify port connectivity. Otherwise, the PowerShell command below can do the job using a .NET TcpClient
:
$server="yourserver"; $port=1433; echo ((new-object Net.Sockets.TcpClient).Connect($server,$port)) "$server is listening on TCP port $port";
Newer versions of PowerShell include a Test-NetConnection
cmdlet to facilitate testing ICMP and port connectivity. Example invocation from a Windows command prompt:
powershell -Command "Test-NetConnection -ComputerName 'yourserver' -Port 1433"