Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hello i am having problems setting my MS SQL server up so i can connect to it remotely. I have enabled remote access in the SQL Server itself, and enabled TCP connections in the config manager. And i have added an allow on port 1433 in the windows firewall! But when i try to connect nothing. I then tried to disable the firewall complete, and suddenly i was able to connect, so the problem must be in the firewall. But what else then adding an allow on port 1433 in the inbound section must i set up before the firewall will allow remote access to my ms sql server?

        C:\Windows\system32>netstat -a -b

Active Connections

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:21             DoomServer:0           LISTENING
 [FileZilla Server.exe]
  TCP    0.0.0.0:25             DoomServer:0           LISTENING
 [hMailServer.exe]
  TCP    0.0.0.0:80             DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    0.0.0.0:110            DoomServer:0           LISTENING
 [hMailServer.exe]
  TCP    0.0.0.0:135            DoomServer:0           LISTENING
  RpcSs
 [svchost.exe]
  TCP    0.0.0.0:143            DoomServer:0           LISTENING
 [hMailServer.exe]
  TCP    0.0.0.0:445            DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    0.0.0.0:1433           DoomServer:0           LISTENING
 [sqlservr.exe]
  TCP    0.0.0.0:3306           DoomServer:0           LISTENING
 [mysqld.exe]
  TCP    0.0.0.0:3389           DoomServer:0           LISTENING
  TermService
 [svchost.exe]
  TCP    0.0.0.0:8080           DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:10080          DoomServer:0           LISTENING
 [nginx.exe]
  TCP    0.0.0.0:47001          DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    0.0.0.0:49152          DoomServer:0           LISTENING
 [wininit.exe]
  TCP    0.0.0.0:49153          DoomServer:0           LISTENING
  eventlog
 [svchost.exe]
  TCP    0.0.0.0:49154          DoomServer:0           LISTENING
  Schedule
 [svchost.exe]
  TCP    0.0.0.0:49155          DoomServer:0           LISTENING
 [lsass.exe]
  TCP    0.0.0.0:49157          DoomServer:0           LISTENING
 [services.exe]
  TCP    0.0.0.0:52309          DoomServer:0           LISTENING
  PolicyAgent
 [svchost.exe]
  TCP    127.0.0.1:14147        DoomServer:0           LISTENING
 [FileZilla Server.exe]
  TCP    127.0.0.1:14147        DoomServer:52055       ESTABLISHED
 [FileZilla Server.exe]
  TCP    127.0.0.1:14147        DoomServer:57096       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57097       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57098       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57099       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57100       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57101       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57102       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57103       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57104       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57105       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57106       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57107       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57108       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57109       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57110       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57111       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57112       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57113       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57114       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57115       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57116       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57117       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57118       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57119       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57120       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57121       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57122       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57123       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57124       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57125       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57126       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57127       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57128       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57129       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57130       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57131       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57132       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57133       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57134       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57135       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57136       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57137       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57138       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57139       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57140       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57141       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57142       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57143       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57145       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57146       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57147       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57148       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57149       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57151       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57152       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57153       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57154       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57155       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57157       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57158       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57161       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57162       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57163       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57167       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57168       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57169       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57170       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57171       TIME_WAIT
  TCP    127.0.0.1:14147        DoomServer:57172       TIME_WAIT
  TCP    127.0.0.1:52055        DoomServer:14147       ESTABLISHED
 [FileZilla Server Interface.exe]
  TCP    127.0.0.1:57159        DoomServer:3306        TIME_WAIT
  TCP    127.0.0.1:60422        DoomServer:60423       ESTABLISHED
 [hMailServer.exe]
  TCP    127.0.0.1:60423        DoomServer:60422       ESTABLISHED
 [hMailServer.exe]
  TCP    188.40.55.84:80        gw:57672               ESTABLISHED
 Can not obtain ownership information
  TCP    188.40.55.84:110       mail-gy0-f131:53479    TIME_WAIT
  TCP    188.40.55.84:139       DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    188.40.55.84:3389      dtv254:62866           ESTABLISHED
  TermService
 [svchost.exe]
  TCP    188.40.55.84:51899     cds62:http             CLOSE_WAIT
 [Download_for_SQL_Server_2008_R2_Web_(x86_x64_ia64)_DVD_en.exe]
  TCP    188.40.55.84:51901     cds62:http             ESTABLISHED
 [Download_for_SQL_Server_2008_R2_Web_(x86_x64_ia64)_DVD_en.exe]
  TCP    [::]:80                DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    [::]:135               DoomServer:0           LISTENING
  RpcSs
 [svchost.exe]
  TCP    [::]:445               DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    [::]:1433              DoomServer:0           LISTENING
 [sqlservr.exe]
  TCP    [::]:3389              DoomServer:0           LISTENING
  TermService
 [svchost.exe]
  TCP    [::]:8080              DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    [::]:47001             DoomServer:0           LISTENING
 Can not obtain ownership information
  TCP    [::]:49152             DoomServer:0           LISTENING
 [wininit.exe]
  TCP    [::]:49153             DoomServer:0           LISTENING
  eventlog
 [svchost.exe]
  TCP    [::]:49154             DoomServer:0           LISTENING
  Schedule
 [svchost.exe]
  TCP    [::]:49155             DoomServer:0           LISTENING
 [lsass.exe]
  TCP    [::]:49157             DoomServer:0           LISTENING
 [services.exe]
  TCP    [::]:52309             DoomServer:0           LISTENING
  PolicyAgent
 [svchost.exe]
  TCP    [2002:bc28:3754::bc28:3754]:1433  DoomServer:57166       ESTABLISHED
 [sqlservr.exe]
  TCP    [2002:bc28:3754::bc28:3754]:57166  DoomServer:ms-sql-s    ESTABLISHED
 [TfsJobAgent.exe]
  UDP    0.0.0.0:123            *:*
  W32Time
 [svchost.exe]
  UDP    0.0.0.0:500            *:*
  IKEEXT
 [svchost.exe]
  UDP    0.0.0.0:1434           *:*
 [sqlbrowser.exe]
  UDP    0.0.0.0:4500           *:*
  IKEEXT
 [svchost.exe]
  UDP    0.0.0.0:5355           *:*
  Dnscache
 [svchost.exe]
  UDP    127.0.0.1:55354        *:*
 [Download_for_SQL_Server_2008_R2_Web_(x86_x64_ia64)_DVD_en.exe]
  UDP    188.40.55.84:137       *:*
 Can not obtain ownership information
  UDP    188.40.55.84:138       *:*
 Can not obtain ownership information
  UDP    [::]:123               *:*
  W32Time
 [svchost.exe]
  UDP    [::]:500               *:*
  IKEEXT
 [svchost.exe]
  UDP    [::]:1434              *:*
 [sqlbrowser.exe]
  UDP    [::]:4500              *:*
  IKEEXT
 [svchost.exe]
  UDP    [::]:5355              *:*
  Dnscache
 [svchost.exe]

C:\Windows\system32>
share|improve this question

2 Answers 2

up vote 2 down vote accepted

A daft question but is the SQL Server actually listening on 1433?

If it's a named instance of SQL Express for example it may be listening on a different port entirely which you either need to specify in the connection string, configure in the client config or have the SQL Browser service running and available to redirect connections.

The SQL Browser service listens on port 1434.

share|improve this answer
    
The server is set to port 1433, if it uses another port then that can't i tell, how can i check this? –  DoomStone Sep 29 '10 at 8:16
    
Adding an exception for port 1434 did not help :( –  DoomStone Sep 29 '10 at 8:17
    
From your listing above it looks like SQL Server is listening on 54784? Go in to the Configuration Manager > SQL Server Network Configuration and verify the settings for TCP/IP which should of course show as enabled. It should have entries listing port 1433 and nothing in the TCP Dynamic Ports box. Also, have you restarted the SQL Server service since making any changes to it? –  Chris W Sep 29 '10 at 8:50
    
Hmm it was set under TCP/IP under IPAll to "TCP Dynamic Ports: 54784"! I remove this and entered "1433" in TCP Port under IPAll. this did not help thoug, i have restarted the sql server. –  DoomStone Sep 29 '10 at 8:55
    
Now re-check the netstat to confirm that SQL is actually listening on the port you think it is. –  Chris W Sep 29 '10 at 8:58

You can check the port that SQL server is really listening on with an elevated command prompt and:

netstat -a -b

Then, as DoomStone says, bung the port in your connection string.

share|improve this answer
    
This is the result, but i can't seem to find sql server in the list? Edit: see first post for list –  DoomStone Sep 29 '10 at 8:36
    
Sorting through netstat isn't the best way to find this info. The sql log states it clearly during startup. –  Sam Sep 30 '10 at 18:09

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.