Connect SQL Server using local IP

  • Dears !

    Good Day !

    I have using SQL Server.

    I write the server name for login as "192.168.10.2\SQLSRVR2008"

    but I want to use server name only as "192.168.10.2"

    How can I do so ?

    Anybody plz help me in this matter.

  • You can only do that if you install as a default instance.

    looks like you installed as named instance, therefore connection will be servername\instanceName

    Regards,
    SQLisAwe5oMe.

  • The problem with using IP address alone is that there's no indication that you wish to connect to the specific \SQLSRVR2008 instance.

    If you set the IP port number for the instance instead of using the default (dynamic IP ports), then you can connect using <ip_address>,<port_number>

    For example, if you set the IP port number for the \SQLSRVR2008 instance to 10001, then you can connect to the instance using 192.168.10.2,10001. Otherwise, as mentioned above, you would have to install the instance as a default (no instance name) instance in order to connect with just an IP address.

     

     

    Eddie Wuerch
    MCM: SQL

  • Eddie Wuerch wrote:

    The problem with using IP address alone is that there's no indication that you wish to connect to the specific \SQLSRVR2008 instance.

    If you set the IP port number for the instance instead of using the default (dynamic IP ports), then you can connect using <ip_address>,<port_number>

    For example, if you set the IP port number for the \SQLSRVR2008 instance to 10001, then you can connect to the instance using 192.168.10.2,10001. Otherwise, as mentioned above, you would have to install the instance as a default (no instance name) instance in order to connect with just an IP address.

    The other problem with using IP address directly is when you perform an upgrade.  You then have to update every connection string to the new IP address or you limit yourself to in-place (risky) upgrades.  Not only are in-place upgrades risky, but they often lead to confusing names - such as an instance name like \SQLSRVR2008 when that instance is now running SQL Server 2019.

    Of course, there are other methods to get around that issue - for example you can change the IP of the new server.  The downside to that is the old instance must be off the network and unavailable, or you have to change the IP address of that server.

    I find it much easier to manage by creating a DNS alias.  Using the DNS alias means we can create a new instance - test and validate that instance and 'migrate' to the new instance with a simple DNS update.  This does mean you really need to consider the instance name and don't use something that identifies the version/edition of SQL Server.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Thanks for all specially yours .... SQLisAwe5oMe

    That is OK but now server is not connecting from other PC on LAN

    I need some more help plz.

    • This reply was modified 1 year, 11 months ago by  maaq2008.
  • maaq2008 wrote:

    Thanks for all specially yours .... SQLisAwe5oMe

    That is OK but now server is not connecting from other PC on LAN

    I need some more help plz.

    What did you change?  Is there an error - if so, what is the error you are now seeing?

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • make sure that TCP/IP protocol is enabled on the sql instance -= need to do it on server itself

Viewing 7 posts - 1 through 6 (of 6 total)

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