Remote Connection problem on MS SQL 2000

Hello,

First, I want to say I read all threads similar this thread and I couldn't solve problem.

My firewall is always off when I tried to connect remotly to SQL Server. I opened 1433 port from my router's configuration page and forwarded it to 10.0.0.4:1433. When I started SQL Server service and checking "netstat" with "-na" paramters. It shows only one row as "TCP - 0.0.0.0:1433 to 0.0.0.0:0". What "0.0.0.0" means and why foreign addres port is "0". I guess, It should like to be "TCP - 10.0.0.4:1433 to OutsideIp:1433". I removed forwarding from my router and used Windows's Network Connection to forward ports. I opened "Network Connections" > "Internet Connection" (It is my router modem) > Properties > Settings. There is only a tab named "Services". I added a service as name "MSSQL", IP address as "10.0.0.4", external and internal port number as "1433", protocol TCP. It added a port forwarding to my router's configuration page but outside Ip was unspecified. And my report on "netstat" was same. I thing my TCP/IP settings are not fine for SQL Server or I need to do something for add "TCP - 10.0.0.4 to OutsideIp:1433" to my "netstat" report.

I'm using Windows XP SP2 and my router modem is Alcatel SpeedTouch 530.
10.0.0.4 is my computer's LAN ip. Outside is the my modem's internet ip.

Does anyone know about free Sql Server host providers I can work on free or trial services.

PS : This problem was happened with SQL Server 2005 too. My SQL Server 2000 instance name is SONMEZKARTAL2. I'm trying to connect with "OutsideIp\SONMEZKARTAL2,1433".

Thanks for reading. Any ideas people



Answer this question

Remote Connection problem on MS SQL 2000

  • SeRya

    Thank you for your reply "MING LV"

    1) SQL 2000 cannot find server.

    2) SQL 2005 didn't response to client.

    3) SQL 2005 is default instance and SQL 2000 is a named instance : SONMEZKARTAL\SONMEZKARTAL2
    My SQL Servers are installed on Windows Service Pack 2. Firewall is always off.

    4) I tried connect with "Enterprise Manager" and "Management Studio". "Management Studio" using .NET, but I don't know how "Enterprise Manager" connects to server.

    5) I'm gonna check it.

    6) Does 1433 port only works for default instance

    Thanks. Happy coding...


  • Baq

    I guess, my SQL Server is not listening ports correctly. I tried with "telnet", It waited like a minute and said "Connection to host lost." I tried different ports too. It showed same message.

    I'm using Windows SP2 and firewall is always off. Maybe something to run for it

    Thanks. Happy coding...


  • SurferJoe

    My SQL Server 2000 is a named instance. Here is the "netstat" report.

    TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1216
    TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 204
    TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
    TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING 204
    TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING 3388

    I tried them. They didn't work.


  • Sagacity

    Nan Tu

    I checked log files of SQL Server. If you look above posts you will see it. I know how to open SQL Server 2005 for TCP/IP connections. My problem is both of instances are not working on listening ports successfully. I tried different ports too. I checked BOL too. I guess I have a problem with my operating system. Anyway, do you know a free or trial SQL Server host provider Maybe I can work with them..

    Thanks. Happy coding...


  • jinksk

    Are you sure that your sql 2000 is named instance

    What is the out put of netstat -ano the contain state = "LISTENING". Something like

    TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 196
    TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
    TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING 4492

    Does "telnet 127.0.0.1 135" or "telnet 127.0.0.1 445" works for you


  • vad23

    I tried with telnet and it waited for like 1 minute and said "Connection to host lost". First, I tried with 127.0.0.1 then I tried with 10.0.0.4 it showed same thing again. It said"Connect Failed" when I tried with my internet ip.

    1) Specified SQL Server not found.
    ConnectionOpen(Connect())

    Enterprise manager and osql showed same message.

    2) Error locating Server/Instance Specified

    It cannot connect with 127.0.0.1 or 10.0.0.4 to 1433 via telnet. On netstat report it shows sql server as "0.0.0.0:1433". "0.0.0.0" means my own computer (Local address "0.0.0.0:1433")

    Thanks again. Happy coding...


  • jslx7

    Sonmez

    You have two instances of sql server on the same machine. For named instance, sql server 2000 in your case, it normally do not listening on default port 1433. You can figure which port it listening on by open looking into ERRORLOG or SQL Server Configuration manager.

    For some SKUs of sql server 2005, by default, it does not allow remote connection, including TCP connection, thus you need to use SQL Server Surface Area Configuration tool to turn it on.

    Both of this is documented in sql server 2005 book online.


  • Toni Dolce

    5) 2006-04-15 00:55:51.64 server SQL server listening on 10.0.0.4: 1433.
    2006-04-15 00:55:51.64 server SQL server listening on 127.0.0.1: 1433.
    2006-04-15 00:55:51.75 server SQL server listening on TCP, Shared Memory.
    2006-04-15 00:55:51.75 server SQL Server is ready for client connections

    It is listening 1433. I checked all log files.

    Thanks. Happy coding...


  • vipix

    Just to confirm that you were trying "telnet 127.0.0.1 135" and so on the same box of your sql server 2000.

    You need to make sure the tcp works for your internel network first. Can you ping your router, normally(10.0.0.1) from your sql server box, e.g. "ping 10.0.0.1"

    Does the file sharing works on your box I saw you were enabling port forwarding on windows box, you can trun them off. They are not needed for your case.

    What is verson of your windows by the way.


  • Sakellariou Dimitris

    Yes, exactly like that. I guess, problem is in SQL Server machine. Because I cannot connect "127.0.0.1:1433" or "10.0.0.4:1433" via telnet.

    Thanks. Happy coding...


  • Jean-Luc David

    1) What error you saw when remotly connecting to SQL 2000

    2) What error you saw when remotely connectiong to SQL 2005

    3) It seems that your SQL Server 2000 was installed as a named instance, how about your SQL 2005 Which OS your SQL 2000 and 2005 were installed on

    4) Which client provider were you using MDAC/.NET

    5) 1433 is the default port for default sql instance, w.r.t named instance in your case, you'd better double check server error log to see which port server is actually listening on.

    6) When you were using "netstat -an", "0.0.0.0:0" means that sql server accept connection from any port of any foreign address. Please make sure that it is sql server that listening on 1433

    HTH.


  • MURALEE KRISHNAN

    Sonmez,

    It is not clear to me that what is network configuration you want achieve. Is the machine that running sql server seperated, network topologically, from the client that connect it by the router you are refering to

    [sql server] -------- [ router] ---------- [client]

    /|\ /|\ /|\ /|\

    |______________| |____________|

    internel network externel network

    Or something else


  • Pravin Kumaradhas

    [sql server] -------- [ router] ---------- [client]

    /|\ /|\ /|\ /|\

    |______________| |____________|

    internel network externel network

    [1] See if sql server is listening on 1433,

    on machine [sql server], type " telnet localhost 1433", if telnet connect, sql server is working fine. I think this should work for you since you can see result of netstat -ano, "0.0.0.0 1433...." on machine [sql server]. Otherwise, sql server is not listening on 1433 correctly. You can also test with "osql -E -Stcp:localhost,1433 on machine [sql server].

    [2] configure the port forwarding correctly.

    (a) configure "externel port" of port forwarding to what ever client want to connect to, default to "1433" since most sql driver use 1433 for default instance. Externel ip address should be "0.0.0.0"

    (b) configure "internel port" of port forwarding to "1433" and "ip address" to ip address of [sql server]. I think in your case, it is 10.0.0.4.

    (c) configure port forwarding as TCP. since TCP portwarding need to keep TCP session state.

    [3] configure client use the "public ip address" assigned by your ISP, and the default port, 1433, for example "telnet public_ip_address 1433". Note, you SHOULD NOT use the internal ip address of your [sql server] box. It is not recognizable by your router externel interface for routing/port forwarding.

    One you can "telnet", you should be able to configure your connection string as "Data Source = <public_ip_address>:1433" to connect to sql server.


  • Mike Waldron

    So, it seems that your SQL 2005 and 2000 were installed on seperate box and you configured the named instance(sql 2000) to listen on 1433, right

    how about use :telnet <ip> 1433, what happened

    Can u provide more detail info about the error message

    1) use Enterprise Manager(use ODBC) to connect to sql 2000, what error reported

    or "osql /S<machinename>\<sql2000instancename> /E"

    2) use Management Studio (<machinename>\<instancename>)to connect to sql 2000, what error reported


  • Remote Connection problem on MS SQL 2000