Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    1

    Unanswered: Connecting to SQL Server over the LAN

    Hello,

    I have SQL Server installed on a machine named SQLHOST with an IP address 192.168.1.4, and SQL server is installed with an instance named 'CLIENTDB'. Now on another machine, I have a client software written using .NET which connects using the following string:

    Server=SQLHOST\CLIENTDB;Initial Catalog=clients;User ID=clientdb;Password=xyz;Trusted_connection=false; Persist Security Info=false;Pooling=false;

    This works fine. But when I replace "SQLHOST" with "192.168.1.4" it does not connect. Why is this? Is there no way one can connect with an IP Address? As this is going to be deployed across the LAN, I would rather rely on the IP address than the computer name... Does this make sense?

    Looking forward to your reply,

    Thanks in advance,
    Jim

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    networking is not really my thing but I am wondering if you are using DHCP or static IP addresses. Can you ping that IP address from your machine? And excuse my networking ignorance but some times machines have an internal IP address and an external one.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jan 2005
    Posts
    28
    Hi,

    Since you do not use the default instance, you should set the server to
    "10.176.4.124\sql2005"

    I could connect with this configuration to a server with IP 10.176.4.124 and instance name sql2005

    Are you using "192.168.1.4\CLIENTDB" instead of "SQLHOST\CLIENTDB" ?

    Eralper
    http://www.kodyaz.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •