Can't connect to SQL Server via IP

  • Have SQL Server installed on a Windows 7 machine which is being used as a server (not my idea). 

    Company has two networks.  Original network of company and new network of parent company. 

    I new local area connection has been created on the Win 7 computer to add an IP in IPv4 to connect to the network of the parent company.  Also when looking at computer name the selection is NOT domain it is workgroup.

    There are two different laptops. 
    1)  Original laptop which connects via original network.
    2)  New laptop which connects via new network (parent company).

    Running an application with the original laptop with original IP works.
    Running the application on the new laptop with new IP results in error "A network or instance specific error occurred while establishing a connection to SQL Server.  The server was not found or was not accessible.  Verify that the instance ....."

    How do I resolve the connection issue on the new computer with the new IP?

  • This sounds like the problem it network related rather than the SQL Server's fault.  Is there any reason why the machine is not part of a domain? This will likely not help the issue either. YOu should really add the SQL Server to the domain at the child company, so that when the parents company authenticates to the child domain, it can find the server via the DHCP.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Not a network person so please bear with me.

    I do not know why it is not part of a domain.  I think there are two domains.  1 for the original company and another for the parent company.

    Basically if users are using their old laptops they want the users to connect to the old network but when they use their new laptops they want the users to connect via the new network.

    Any ideas?

  • crvasquez1984 - Friday, September 8, 2017 8:45 AM

    Not a network person so please bear with me.

    I do not know why it is not part of a domain.  I think there are two domains.  1 for the original company and another for the parent company.

    Basically if users are using their old laptops they want the users to connect to the old network but when they use their new laptops they want the users to connect via the new network.

    Any ideas?

    I'm not a network person either, but my point in regards to the workgroup vs domain still stands. Personally, I'd ask your network team to trouble shoot the issue, and get it on the appropriate domain. If both domains are part of the same Forest, and there is trust between the 2, then, hopefully, adding it to the domain will make the problem "go away".

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • You need to touch base with the network people.  It sounds as if this is being blocked by a firewall.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Do ping requests from the laptop on the parent network respond to the IP to the SQL Server on the parent network? That would help verify that layer 3 networking to the instance from the client at least works or doesn't and provides feedback that you can give to your network administrators. Better yet is a trace route or pathping from the laptop to the SQL Server as it gives where on the path things stop working.

    Joie Andrew
    "Since 1982"

  • I narrowed the issue. I downloaded SSMS on the computer that is connecting to the new network. I was able to connect to SQL Server on the computer 10.0.0.100 with the new IP 10.1.0.7. Connection was successful. (IPs are examples).

    More troubleshooting determined that the problem is getting the connection string in .NET from the app.config file on the new machine. It is empty.

    The new computer is Win10 the original computer connecting with old IP is Win 7.

    Any ideas?

  • So, after some testing I was able to connect to the database from the new computer via the new network.  Problem is that I had to pass in the IP.  
                
    The computer name is NOT resolving the IP which would make it easier.  Will talk to Network Engineers to see if something can be done to allow the hostname to resolve the IP (prob not). Otherwise I will need to write a piece of code to determine which IP should be used.

  • crvasquez1984 - Wednesday, September 13, 2017 9:08 AM

    So, after some testing I was able to connect to the database from the new computer via the new network.  Problem is that I had to pass in the IP.  
                
    The computer name is NOT resolving the IP which would make it easier.  Will talk to Network Engineers to see if something can be done to allow the hostname to resolve the IP (prob not). Otherwise I will need to write a piece of code to determine which IP should be used.

    Pretty good bet that putting the new machine into the new domain solves that problem.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Unfortunately they are not setting it up as a Domain.

  • crvasquez1984 - Wednesday, September 13, 2017 2:14 PM

    Unfortunately they are not setting it up as a Domain.

    If it's not going to be part of the network, you might be able to use the hosts file to resolve by host name.
    But since you have a bit of a different network situation, you should check with Network Engineers and see if that's going to cause problems.

    Sue

  • crvasquez1984 - Wednesday, September 13, 2017 2:14 PM

    Unfortunately they are not setting it up as a Domain.

    Is there any reason why they don't want to put the SQL Server in the domain? It would make things so much easier. 🙂

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • crvasquez1984 - Wednesday, September 13, 2017 2:14 PM

    Unfortunately they are not setting it up as a Domain.

    Unfortunate, and potentially negligent...  That choice effectively exempts that machine from any/all domain group policies, and potentially invites malware and/or hacking for that very reason.  Sounds like a genuinely bad idea.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 13 posts - 1 through 12 (of 12 total)

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