Rahul Sharma: How to debug Dynamics 365 Finance production or UAT database
In this post, we will see how we can debug production data from the development environment.
There can be many scenarios where we want to get the production dataset to test new features or reports in development.
Before you debug, make sure that UAT and Development environment has same application version and code base. And most importantly, dont run database synchronization from Visual Studio. This might change the UAT database schema and affect the users in UAT.
Below are the steps we need to follow to debug the production dataset.
Refresh sandbox (UAT) environment with production data
Follow this link to overwrite UAT database with the latest production database.
Once this is done, you will have production data running in the UAT environment.
UAT: A Sandbox Standard Acceptance Test environment that uses Microsoft Azure SQL Database as it's database platform.
Enable sandbox azure sql database to be connected with development environment
The process is called IP Whitelisting. By default only sandbox AOS server can access this azure sql database because of firewall rules in place. In order to access UAT database from Development sever, we need to add our development VM's IP address to the azure sql database server whitelist.
Login to your development server and obtain IP address. You can get it easily by doing a Google search for "What's my IP".
We are going to use this Development Server IP address below while running a sql query.
Sandbox AOS server:
From the LCS sandbox environment details page, under Database Accounts section, note the SQL Server \ Database name, password for user name axdbadmin.
Note: in order to complete the sql server name, suffix .database.windows.net with server name from LCS.
Once connected, execute the following query replacing a.b.c.d with the Development Server IP address we searched above.
-- Create database-level firewall setting for development IP address a.b.c.d
EXECUTE sp_set_database_firewall_rule N'Debugging rule for DevTest environment', 'a.b.c.d', 'a.b.c.d';
This will add your Development Server IP address as a valid IP address to the database server firewall whitelist.
On your development server, open SSMS and try to connect to the same azure sql server using axdbadmin creds we noted above. At this point, you should be able to connect to the sandbox Azure SQL Server database.
Takeaway: Using this process, you can actually access sandbox database from any machine.
Change development database connection
Now we need to modify the web.config file so that our development Dynamics 365 Finance application can point to UAT database. Once this is done, our dev application local code will be running against the UAT database.
You can find web.config file on service drive, and in the AoSService\WebRoot directory. (Typically, the Services drive is drive J or K.).
Open the web.config file in Notepad or another editor, and change the following configurations:
Save the file and restart IIS or IIS Express.
Now that the development environment is configured to use data from UAT. You can go ahead and start debugging the code against this production or sandbox data.
Join me on facebook and feel free to post your comments / feedback / queries.
Join me on facebook | twitter | linkedin !!!
|msdynamicsworld: How to use Power Automate to extract data from Microsoft Dynamics 365 Finance and Operations via Data management package REST API||Blog bot||DAX Blogs||0||24.12.2019 20:14|
|alirazazaidi: How to load number sequence class on UAT or Production server Dynamics 365 for finance and operations.||Blog bot||DAX Blogs||0||16.06.2019 23:14|
|stoneridgesoftware: How to Resolve Code Merge Conflicts after Upgrading to Dynamics 365 for Finance and Operations||Blog bot||DAX Blogs||0||12.07.2018 11:11|
|crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 14||Blog bot||Dynamics CRM: Blogs||0||12.07.2013 07:13|
|german_nav_developer: Buildnummern-Übersicht Microsoft Dynamics NAV 2009||Blog bot||Dynamics CRM: Blogs||0||04.06.2010 13:21|
|Опции темы||Поиск в этой теме|