21.05.2020, 23:11 | #1 |
Участник
|
Rahul Sharma: How to debug Dynamics 365 Finance production or UAT database
Источник: http://feedproxy.google.com/~r/Rahul...-database.html
============== In this post, we will see how we can debug production data from the development environment. Applies to:
Lets debug. 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. Development server: 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. On sandbox AOS Server, open SQL Server Management Studio (SSMS) and connect to the azure sql server with sql server name, user name and password noted above. 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. Development server: 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. Happy debugging! Join me on facebook | twitter | linkedin !!! Источник: http://feedproxy.google.com/~r/Rahul...-database.html |
|
|
|