D365 F&O Data Refresh from Tier 2 to Tier 1


Download bacpac file from LCS

select project->asset library-> database backup


1. Download the  DacFramework.msi installer for Windows. Install it 

2. download sqlpackage for Windows. "https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download?view=sql-server-ver15"

        extract the zip file  in below path

        extract here: C:\Program Files\Microsoft SQL Server\SQL Packages

3.      Copy your bacpac file in "J:\MSSQL_BACKUP"

4.      Open command prompt as admin and do below steps.

        cd C:\Program Files\Microsoft SQL Server\SQL Packages

SqlPackage.exe /a:import /sf:"I:\MSSQL_BACKUP\axbackup.bacpac" /tsn:localhost /tdn:AXDB_0111 /p:CommandTimeout=800 /TargetTrustServerCertificate:True


5  Execute the commands to swap the db names

a. To rename the existing db to new db 

USE [master];

GO

ALTER DATABASE [AxDB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

GO

EXEC sp_renamedb N'AxDB', N'AxDB_Old_0111'--- if it thow error stop. Turn off the Microsoft batch services and world wide web publishing service


b.Rename the new db with the AxDB

EXEC sp_renamedb N'AXDB_0111', N'AxDB';

go

c. Set db in multiuser mode

USE [master];

GO

ALTER DATABASE [AxDB] SET multi_USER WITH ROLLBACK IMMEDIATE;

GO



6.We can do adminprovisioning from below 

>>Go to K>AOS>packagelocaldirectory>bin > AdminUserprovicsioning


7 Then do full build and synchronise the database 

8 check the below services 

  1.world wide web publishing service

  2.Microsoft Dynamics 365 Unified Operations: Batch Management Service

  3. IIS AOS services

if status is showing as stopped just start the service


9. check the client. It should be accessible.

 

No comments:

Post a Comment