SQL Login error from client computer

  • [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

    I can not connect to the SQL from the Other PC which is on the same network (non-domain environment). I will explain the old setup and new setup.

    OLD Setup

    Main PC was XP Pro which was hosting Sql server and the custom made application which had the database. NOW the other computer on the network with Vista Business was accessing that program without any problem.

    NEW Setup

    NOW the XP PC died. So we replaced with new Windows7 Pro(32bit) PC.

    The Main program which uses the SQL on the main pc is working fine and all the sql services are running.

    The folder of the program been shared and the other PC can see it and access it.

    SQL browser, SQL server program has been allowed in exceptions.

    TCP protocol is enabled, Remote Connections is enabled in Database Properties.

    TCP port: 1433 and UDP port: 1434 is allowed in the exceptions.

    Troubleshooting done.

    From the other PC when I telnet port 1433 then it was not connecting. And so I found out that the SQL hosting pc was giving random port. So I have given default port 1433 in the SQL. And after that I am able to telnet pcname 1433.

    BUT I can not telnet pcname 1434. It keeps denying.

    What else I can check to troubleshoot that why UDP port 1434 is not accepting the connection.

    I was reading some article allowing port number in the string. But how can I do that if i got the string like Target path "\\pcname\programfolder\filename.exe \\pcname\programfolder\filename.udl". Start In "\\pcname\programfolder\filename.exe"

    Could it be the router. But the whole setup has been working fine before with XP Pro as the main pc.

    any help will be appreciated

    thanks

  • I have not found telnet to be all that reliable since some firewalls will block it. PortQry is what I use for things like this. It will allow you to test 1433 TCP and 1434 UDP from wherever you need to.

    http://www.microsoft.com/en-us/download/details.aspx?id=17148

    PortQry.exe -n localhost -p udp -e 1434

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • thanks opc.three

    it was quite helpful in getting to the bottom of the problem. I found out that the UDP port is opened but its getting filtered. So sql browser is not listening it.

    So got to find out why?

  • What do you mean by filtered? SQL Browser listens on UDP 1434 if the service is enabled. Is the service enabled and set to auto-start when the machine starts?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • The SQL browser service is running and enabled.

    C:\PortQryV2>portqry.exe -n mainpc -p udp -e 1434

    Querying target system called:

    mainpc

    Attempting to resolve name to IP address...

    Name resolved to 192.168.200.25

    querying...

    UDP port 1434 (ms-sql-m service): LISTENING or FILTERED

    Sending SQL Server query to UDP port 1434...

    UDP port 1434 (ms-sql-m service): FILTERED

    --- The above is the output I get when execute from the client pc and the above IP address is where the SQL is runninng.

  • Filtered means no response was received. Just to confirm, did you run the command on mainpc or from a different machine, i.e. the remote client? Make sure there are no firewalls in between the remote client and mainpc that might interefere with network traffic. Also try running the portqry command on mainpc itself as a baseline to ensure the Broswer service is running, listening and responding as expected.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • I ran that on the Remote PC. But after your comment when I ran it on the main PC I am getting same result FILTERED.

    Is it something to do with the Browser Service?

    I have checked the SQL Browser service and its running and in Automatic Mode. I have stopped the Windows Firewall and also Anti-Virus. But same result.

    So I should get LISTENING from the portquery output which I am not - is that right?

    I think we are not too far at root cause of the problem. your prompt reply is highly appreciated.

  • shreyanshbhatt (2/5/2013)


    I ran that on the Remote PC. But after your comment when I ran it on the main PC I am getting same result FILTERED.

    Is it something to do with the Browser Service?

    I have checked the SQL Browser service and its running and in Automatic Mode. I have stopped the Windows Firewall and also Anti-Virus. But same result.

    So I should get LISTENING from the portquery output which I am not - is that right?

    I think we are not too far at root cause of the problem. your prompt reply is highly appreciated.

    Yes, you ought to see LISTENING.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Hi opc.three,

    thanks for your help. And the problem is resolved. And we had to get the connection string changed to the UDL file.

    thanks,

    Shree

  • Just a heads up, I just noticed you're using DBNETLIB which is a deprecated driver in SQL 2008 and to my knowledge is no longer supported being supported in SQL 2012.

    What did you have to change in your connection string?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply