AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 21.05.2020, 23:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
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:
  • Dynamics 365 Finance
  • Dynamics 365 Supply Chain Management
Note: Dynamics 365 Finance and Operations is now licensed as multi-purpose business applications. As of this writing customers can purchase Dynamics 365 Finance, Dynamics 365 Supply Chain Management and Dynamics 365 Commerce applications separately.


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 and feel free to post your comments / feedback / queries.

Join me on facebook | twitter | linkedin !!!



Источник: http://feedproxy.google.com/~r/Rahul...-database.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
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
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:33.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.