Sql-server – Cannot telnet SQL Server port 1433

sql server

I have Windows Server 2008 with SQL Server 2012 Enterprise installed on it.

I disabled the Windows firewall and I'm sure that there isn't another firewall.

I cannot telnet my server.

I enabled TCP/IP, named pipes etc. in the SQL Server Configuration Manager and restarted everything.

By the way I can telnet locally, the problem is telnet via the network.

Any idea why I cannot telnet?

Best Answer

Here's a powershell script I wrote for checking connectivity to SQL servers as you are using the default port (1433) all you need to do is pass in the server name. If the connection fails the exception should give you a clue as to why.

e.g. CheckSql.ps1 server\instance

CheckSql.ps1

param([Parameter(Mandatory=$true,ValueFromPipeline=$true)][string]$serverInstance);

$connectionString = "Data Source={0};Integrated Security=true;Application Name=CheckSQL.ps1" -f $serverInstance;
$sqlConn = new-object("Data.SqlClient.SQLConnection") $connectionString;

Write-Host $connectionString

try {
    $sqlConn.Open();
    $sqlConn.Close();
    Write-Host "Connected OK"-foregroundcolor white -backgroundcolor green
}
catch { 
    Write-Host $_ -foregroundcolor white -backgroundcolor red
}
finally { 
    $sqlConn.Dispose(); 
}