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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 27.03.2020, 12:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
alirazazaidi: How to restore a Production database to the DevBox environment Dynamics 365 For Finance and Operations
Источник: https://www.tech.alirazazaidi.com/ho...nd-operations/
==============

This blog post is for my notes, you can find more details on Microsoft link.

There are some extra steps in the Microsoft link, which I never used. I usually follow only these steps and it works for me. So Instead I need to search on Microsoft link. I wrote this post for my future use.


Step 1: You have to restore production database to UAT and then from uat to export it to Asset library

Step 2: Download Backpac file in specific location

Step 3:  Open Command prompt with run as administrator for locally hosted VM and go to following location



Cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin Step 4: run the following command

SqlPackage.exe /a:import /sf:D:\Exportedbacpac\my.bacpac /tsn:localhost /tdn: /p:CommandTimeout=1200I modified the above statement asSqlPackage.exe /a:import /sf:C:\Temp\hsauatbackup.bacpac /tsn:localhost /tdn:AxDb_6 /p:CommandTimeout=1200Step 5: run the following command.

After the database is restored. Run the following command in SQL Server management


CREATE USER axdeployuser FROM LOGIN axdeployuserEXEC sp_addrolemember 'db_owner', 'axdeployuser'CREATE USER axdbadmin FROM LOGIN axdbadminEXEC sp_addrolemember 'db_owner', 'axdbadmin'CREATE USER axmrruntimeuser FROM LOGIN axmrruntimeuserEXEC sp_addrolemember 'db_datareader', 'axmrruntimeuser'EXEC sp_addrolemember 'db_datawriter', 'axmrruntimeuser'CREATE USER axretaildatasyncuser FROM LOGIN axretaildatasyncuserEXEC sp_addrolemember 'DataSyncUsersRole', 'axretaildatasyncuser'CREATE USER axretailruntimeuser FROM LOGIN axretailruntimeuserEXEC sp_addrolemember 'UsersRole', 'axretailruntimeuser'EXEC sp_addrolemember 'ReportUsersRole', 'axretailruntimeuser'CREATE USER axdeployextuser FROM LOGIN axdeployextuserEXEC sp_addrolemember 'DeployExtensibilityRole', 'axdeployextuser'CREATE USER [NT AUTHORITY\NETWORK SERVICE] FROM LOGIN [NT AUTHORITY\NETWORK SERVICE]EXEC sp_addrolemember 'db_owner', 'NT AUTHORITY\NETWORK SERVICE'UPDATE T1SET T1.storageproviderid = 0 , T1.accessinformation = '' , T1.modifiedby = 'Admin' , T1.modifieddatetime = getdate()FROM docuvalue T1WHERE T1.storageproviderid = 1 --Azure storageDROP PROCEDURE IF EXISTS SP_ConfigureTablesForChangeTrackingDROP PROCEDURE IF EXISTS SP_ConfigureTablesForChangeTracking_V2GO-- Begin Refresh Retail FullText CatalogsDECLARE @RFTXNAME NVARCHAR(MAX);DECLARE @RFTXSQL NVARCHAR(MAX);DECLARE retail_ftx CURSOR FORSELECT OBJECT_SCHEMA_NAME(object_id) + '.' + OBJECT_NAME(object_id) fullname FROM SYS.FULLTEXT_INDEXES WHERE FULLTEXT_CATALOG_ID = (SELECT TOP 1 FULLTEXT_CATALOG_ID FROM SYS.FULLTEXT_CATALOGS WHERE NAME = 'COMMERCEFULLTEXTCATALOG');OPEN retail_ftx;FETCH NEXT FROM retail_ftx INTO @RFTXNAME;BEGIN TRY WHILE @@FETCH_STATUS = 0 BEGIN PRINT 'Refreshing Full Text Index ' + @RFTXNAME; EXEC SP_FULLTEXT_TABLE @RFTXNAME, 'activate'; SET @RFTXSQL = 'ALTER FULLTEXT INDEX ON ' + @RFTXNAME + ' START FULL POPULATION'; EXEC SP_EXECUTESQL @RFTXSQL; FETCH NEXT FROM retail_ftx INTO @RFTXNAME; ENDEND TRYBEGIN CATCH PRINT error_message()END CATCHCLOSE retail_ftx; DEALLOCATE retail_ftx; Delete the AXDB. Create backup.

Rename current database to AXDB




Источник: https://www.tech.alirazazaidi.com/ho...nd-operations/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
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
powerobjects: How to Integrate Power BI with Dynamics 365 for Finance and Operations Blog bot Dynamics CRM: Blogs 0 26.06.2018 01:23
atinkerersnotebook: Learn how to Create a new Dynamics 365 for Operations Training Environment through Lifecycle Services Blog bot DAX Blogs 0 01.12.2016 18:11
jaestevan: Microsoft Dynamics 365 for Operations Blog bot DAX Blogs 0 02.11.2016 01:11
Platform updates overview - 3.70.B - NAV2009 R2 Blog bot Dynamics CRM: Blogs 0 07.02.2011 22:06
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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