SQL access on production in D365FO
With the introduction of D365 Finance & operations cloud environment over AX 2012, Microsoft took over the control of the production window server OS environment leading to requesting deployment via LCS as compared to manual deployment before and also SQL Server Management Studio(SSMS) is now not available for SQL manipulation.
Of course one of the intentions behind restricting production access was not able to access SQL commands thereby avoiding data inconsistency. But as a developer, I always wanted to explore the ways in which SQL could be accessed on production indirectly. So I present my way of SQL browser in D365 finance & operations production environment.
We need to create 2 class
1) SQLBrowser which will create a dialog to take SQL input
2) SQLHelper which will process the inputted query
Disclaimer: SQL usage over production environment should be used with caution
To access SqlBrowser class on production
Enter the following URL
www.YourERPUrl.com/?mi=sysclassrunner&cls=SqlBrowser
Above URL will open dialog where you can input SQL queries and get desired results.
I hope this article helped you learn how to access SQL on production environment in D365 Finance & operations AX. Don’t forget to share this article. You may also want to see our article on How to use POSTMAN to access D365FO Odata endpoint. You can follow us on facebook for more tips and tricks.
Comments: 5
Worked for me. Thanks a lot for the help.
I’m glad to hear it worked well for you
Thank you very much. this article is very helpful
Does this work with parameters also like applying where condition?
landed on this page while searching something on google, glad that its from my office senior (from YMSLI)