web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Can I access SQL server DB from my VM

(0) ShareShare
ReportReport
Posted on by

Hi,

This is not directly a Dynamics 365 questions, but I currently working on D365 F&O environment. I need to access AXDB SQL Server in other VM, from my own VM. 

What I know is the AXDB on the "other VM" is a local AXDB. I'm using SSMS in my own VM to get connect to that AXDB but failed. It is says server not found or not accessible.

Can someone guide me how to make it work ? 

I was heard that this is possible, but my admin told me it is not but I doubt it. I have access to those 2 VM, mine and the server VM, only I don't know how to make it works. All I know or tried is, I can ping its IP address from my VM, and in that VM, in its SQL server, I've checked "Allow remote connection to this server". Far from these, I have no clue what to do next.

Please help.

Thanks. 

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi Voltes,

    Please check the similar thread:

    community.dynamics.com/.../accessing-sql-server-between-vm

  • VoltesDev Profile Picture
    on at

    Hi Will,

    Yeah, I found this also, but unfortunately I don't understand, I'm only work as Data analyst, so querying is only what I did until now, no knowledge of this SQL admin or hardware/network setup thing. Can you guide me what I need to do to make this happen ?

    Thanks.

  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi VoltesDev,

    Can you tell what you want to achieve with direct access to the SQL server? Note that this is not supported for Microsoft managed production environments. If you need data for building reports, the suggested way would be exporting data to a BYOD and then access the data.

    If you need it for other purposes, can you tell of the other VM is running in the cloud or on a laptop using Hyper-V?

  • VoltesDev Profile Picture
    on at

    Hi Andre,

    Yes, it is not on Production environment. The target server VM is Cloud based.

    And the purposes is only for checking data on its Power BI report (using Power BI Service, not the analytic workspace of F&O). I will not create any other report, just to verify the data is correct or not, but to do that, I need to do some querying to some raw tables in AXDB of that VM machine. That's why I need to connect to that VM from my machine SSMS.

    If not, then I need to log in to that VM, because the AXDB is in local drive (not Cloud), there is a limitation of numbers of users connected to that VM, so it is better that I can use my own machine to connect to that VM's AXDB remotely instead.

    Thanks

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi VoltesDev,

    As the database is local on the VM (in cloud), you can't access it from another VM. Either you need access to that VM or get a backup of the database to restore it in your VM.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Actually you can access it by allowing remote connections in SQL setup, and opening the required firewall port(s) on the VM.

    This is not specific to D365, instead it's SQL and Windows administration, but you should find good instructions by copy-pasting my previous sentence in a web search engine.

  • VoltesDev Profile Picture
    on at

    Hi Nikolaos,

    Can you guide me the detail step what to do ?

    Understand about your saying by googling it, however I cannot find the more friendly and easy to understand resources. I am only querying data, not a SQL admin / network admin, with all those web resources full of technical 'buzzword', I really don't have a clue what to do. Some of those web resources also depends on their "pre-defined" condition which result different outcome.

    As mentioned before, all I can do is to "ping" it to see they "know each other" and make sure in the target VM, the connection setting "Allow remote connection to this server" is checked. Nothing much after that.

    Thanks

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Hi VoltesDev,

    when you want to connect from one machine into SQL Server which is hosted on another machine, the connection must pass three "gates".

    1. Outbound firewall on your computer - this is usually open by default so we can ignore it for now

    2. Inbound firewall on the other computer: it must be opened so that your request doesn't get blocked by the operating system

    3. SQL Server remote connection setting: used to allow/block connections from other computers in SQL Server itself. Only if the firewall in point 2 let you through, the connection ends up here.

    You said that you have allowed remote connections in SQL Server, so most likely the firewall on that server (point 2) is the reason why you can't access.

    So, I googled "SQL server remote access firewall" and this MS documentation page was the first result: https://docs.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-ver15

    Also, if you're not an expert on the topic, always discuss these things with your IT team, since opening the firewalls might also open the gate for unwanted / harmful visitors. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans