Showing posts with label Dynamics 365 Finance & Operations. Show all posts
Showing posts with label Dynamics 365 Finance & Operations. Show all posts

Monday, February 19, 2024

Dynamics 365 F&O: Steps to import Database backup into Dev VM machine

This post describes the steps that are followed to restore UAT/Sandbox database (*.bacpac) into Azure Dev virtual machine.

 1. Download *.bacpac file from LCS.

LCS-> Select the project-> Shared Asset Library-> Database backup-> click the respective database file.

It will download the *. bacpac file

2. Save the db backup file in the dev machine's local folder for import.

3.Install SQL Package file in the dev machine.

Download and install SqlPackage - SQL Server | Microsoft Learn

4. Extract the SQL package zip

5. Open CMD prompt as an admin.

6. Navigate to SQL package folder

cd folder_path

7. Execute the following sql package import command.

SqlPackage.exe /a:import /sf:C:\Users\Admin1234\Documents\Backup\dbbackup.bacpac /tsn:localhost /tdn:AXDB_UAT /p:CommandTimeout=1200 /TargetEncryptConnection:False

8. Shrink the current DB's log file

ALTER DATABASE AxDB SET RECOVERY SIMPLE;
USE AxDB;
GO
CHECKPOINT;
GO
DBCC SHRINKFILE(AxDBCopy3_log, 1000); -- 1000 = 1GB
GO

9. After import rename restored DB's name as AxDB


USE master;  
GO  
ALTER DATABASE AxDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE AxDB MODIFY NAME = AxDB_Orig;
GO  
ALTER DATABASE AxDB_Orig SET MULTI_USER;
GO
USE master;  
GO  
ALTER DATABASE AxDB0906 SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE AxDB_UAT MODIFY NAME = AxDB;
GO  
ALTER DATABASE AxDB SET MULTI_USER;
GO

10. Synchronize the application with the DB using Visual Studio


Regards,
Arun S Keerthi











 

Friday, February 16, 2024

Dynamics 365 F&O - Setup Azure Dev Machine for Development

 In this blog I have shared the steps that are required to setup Dynamics 365 F&O Azure VM for development.

1. Connect to your Azure DEV virtual machine using Admin credentials. You can find the VM details in LCS > Cloud hosted environment. 

Note: You must be Environment Manager in order to see the credentials. Otherwise, please contact your LCS Administrator. 

2. Remote to Azure Dev VM and Open Visual Studio. 

Dev machine comes with Visual Studio and SSMS installed on the machine. 

3. Open Visual Studio as an Admin. Enter your Active Directory credentials to access VS. 

4. Connect Azure DevOps using Team explorer.

Enter the Azure DevOps URL. 

5. Map Azure DevOps' Metadata with K:\AosService\PackagesLocalDirectory and

map Project folder with Visual Studio project folder C:\Users\Adminf33bea59b8\Documents\Visual Studio 2022\Code Snippets\Projects.

   This will bring all the latest changes from Azure DevOps.

6. Refresh models.

VS -> Dynamics 365 -> Model Managment -> Refresh Model.

This will bring all the models that are used in the project from Azure DevOps.

7. Build Models

VS -> Dynamics 365 -> Build Models

8. Synchronize Database 

VS -> Dynamics 365 -> Synchronize Database


Regards,

Arun S Keerthi