How to connect and querying SQL Server dB from another VM

  • Hello experts,

    I'm no SQL experts especially in server administration, so would to ask your guidance on my needed. So currently I have two VM that both have its SQL Server DB installed. The question is : if I want to query the other DB from my VM by using SSMS how am I going to achieve that ?

    For example, I have VM A and VM B, VM A is my development VM, but if I need to query something I want to query DB in VM B.

    Currently, using SSMS, when I try to Connect and put the Server name of VM B then using SQL Server Authentication and use VM B user (admin) and its password, it will say error "Network path not found"

    What are the steps to connect and querying DB on another VM ?

     

    Thanks

     

     

     

  • I take it both are domain joined machines?

    can you ping VMb from VMa?

    can you telnet or use powershells TNC cmdlet to connect from VMa to VMb on the sql port? (Typically 1433 unless you on a named instance)

    have you allowed the firewalls rules inbound in VMb to accept external connections again on 1433 or whatever port sql is listening on?

    what other troubleshooting have you done.

    can you post the full message or screen shot

  • Hi,

    I've limited knowledge about those, but here's what I tried for answering that.

    • In VM B (the server), I'm looking for its IP address, and got it from Command Prompt and type "ipconfig"
    • So in VM A (mine), in Command Prompt I tried to ping that and succeeded. Got a "reply from"
    • In VM B, from its SSMS, on the server node, right click - property, go to tab Connection, verified the "Allow remote to this connection" is checked.

    That's all I know of now.

    The error is "Server not found or not accessible", as attached.

    Capture

    the DFO-JM-DATA-01 is the DB name on VM B

    Thanks

  • What about the other points I mentioned?

    Ok so you can ping which means they can see each other.

    The screen shot says your using a named instance of SQL, so you need to open up the correct port on the vmB.  Be that for the browser or set a static port and open that in the firewall configuration.

  • Hi,

    May I know how to do that ? Can you help on steps ?

    Because I have no knowledge about this sql admin things, so it will be much appreciated if there are some "clear" steps what to do.

    Never use telnet or powershells TNC before.

    Thanks.

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

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