Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jul 16 '12 at 13:06

This question came from our site for professional and enthusiast programmers.

    
which are you using to locate your SQL server over network? windows host name? ip address? sql named instance? –  Kuba Wyrostek Jul 16 '12 at 12:41
    
Are you sure you have network connectivity from remote machine to your server (i.e. no routers/firewalls between two machines)? Have you tried using diagnostic tools (traceroute, tcpdump/wireshark etc.) to see what happened with your packets? Can you telnet any other port? –  Miljen Mikic Jul 16 '12 at 12:45
1  
It's not really recommended to disable the firewall entirely; instead, create a firewall allow rule for the SQL Server service. You really have to wrangle with the firewall settings to actually turn it off completely, so this may still be the problem. –  Jon Seigel Jul 17 '12 at 1:04
    
Do you have a non default port #? Is it a named instance or the default MSSQLServer instance? Also does your connection string put in a port # and do you go through any extra ACLs that the web servers might not? –  Ali Razeghi Nov 9 '12 at 22:27
    
Any update for us? –  Ali Razeghi Dec 9 '12 at 17:16
add comment

1 Answer 1

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(); 
}
share|improve this answer
    
I'm trying to connect with IP address(I can connect with MSSMS with this IP address in my server locally). And I can connect to my server via RDP, there are lots of websites that connecting to sql server and everything works fine. The only problem is remote connection. I can telnet with 80,110 port remotely but cannot with 1433 port. And 1433 port is opened in firewall. I will try wireshark, it's a good idea. And will write the results. –  Salim Jul 17 '12 at 17:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.