Skip to main content

Applying Service Updates to On-Prem Environment in D365 F&O

 Hello Devs!

In case of On-Premises environments we need to apply service updates using CMD and below are the series of steps and commands.



Prerequisites:

1) Access to LifeCycle Services(LCS). 


Step 1 : 

 Login to LCS, Check for the latest available service updates and download it.


Download package and Unzip the package(Don't forget to unblock it before extracting, Right click and check unblock).



Step 2 :

Navigate to the folder where file has been extracted using CMD and Execute the below command to check for the installed versions of the services

ServiceUpdate2 is my folder where I have extracted the file. 


C:\ServiceUpdate2>AXUpdateInstaller.exe list

Copy and save the output for future use, In my case it look like this




Now, Edit DefaultTopologyData file placed within the extracted folder.  Add those services which we have copied in last step and change the machine name(In my case its VW-LAB-Dyndev1).


Step 3 :
We need to execute below series of command


Note : In my case the I was using C Drive and DP2 is my folder where I have extracted the file.

1) The folder in which the package is placed, it should be non user folder and there should be no space within title of the folder (All folders that are in file path)

Example : C/User/Download (Will result in error, User folder error)

C/Program files/Package (Will result in error, space within path).



Series of CMD commands:


You should rename the RunbookFile 


1) Check the available list of Runbook

C:\DP2>AXUpdateInstaller.exe list

2) 

C:\DP2>AXUpdateInstaller.exe generate -runbookid="AFPRunBookId-runbook" -topologyfile="DefaultTopologyData.xml" -servicemodelfile="DefaultServiceModelData.xml" -runbookfile="AFPRunBookId-runbook.xml"


Note : "AFPRunBookId-runbook" is the book title in my case, You have to set as per your case.

3) 

C:\DP2>AXUpdateInstaller.exe import -runbookfile=AFPRunBookId-runbook.xml

Note : "AFPRunBookId-runbook" is the book title in my case, You have to set as per your case.

4) 

C:\DP2>AXUpdateInstaller.exe execute -runbookid=AFPRunBookId-runbook.xml

5)

C:\DP2>AXUpdateInstaller.exe execute -runbookid=AFPRunBookId-runbook



It will take 3-4 hours as it involve more than 60 steps to be completed for successful service update. After the installation you can compare the versions.


Things to note :
1) Step may fails and it could be due to multiple issues for that we can check the log file placed in the same extracted folder and then "Rerun" the step again using below command.
In my case the command look like this
C:\ServiceUpdate2>AXUpdateInstaller.exe execute -runbookid="AFPRunBookId-runbook" -rerunstep=19

Standard command : 
AXUpdateInstaller.exe execute -runbookid=[runbookID] -rerunstep=[stepID]

2) There is a flaw in scrips from MS and normally step 24 fails due to reporting service error. Just restart the service and rerun the step again using above command or restart the service before step 24. 

Hope you find this information helpful. 



Comments

Popular posts from this blog

D365 Print Management Setup to print reports

In Microsoft Dynamics Ax D365, we have the out of the box feature of print management to print report either OOTB or custom reports of our clients so for that we need to configure the print management settings. We normally faces this warning message when we print the reports without the setting has been done. Firstly , select Form setup ( Accounts Receivable >> Forms >> Form setup  ) Secondly, In the General tab , select Print Management Thirdly, In the Document Tab right click and select New tab Moreover , we need to set the listed below details and need to select our required reports to load using print management Furthermore , we now nee to go to All Free Tax Invoices in AR Lastly you can use the FTI to generate the respective report using the print button. This time the Warning will be Gone!!! 

Upload and Download file to BLOB storage Account in D365 F&O using X++

Hello Devs! This blog will be a source of help for many Devs who are working on Azure Blog Storage account. We normally use azure blob storage account to hold thing that need to be further processed and stored on cloud. Scenario:  We have been asked to * Upload file to azure * Download file from azure "We will be using Share File Management technique" Case #1 : Uploading File to Azure  Note : Here we are using  PurchParameter  table to extract urls and other folder related details you can use your own folder name to access the azure blob folder Further, Credential details have already been extracted i.e vault key,authorization key and has been stored in our custom table and extracted from d365 through azure parameters  storageCredentials  = new Microsoft.WindowsAzure.Storage.Auth.StorageCredentials(SystemParameters::find().CMTStorageAccountName, purchParameters.CMTTankKeyVaultSecret); Or alternatively, CloudStorageAccount storageAccount =                 Clo

Error : 9002 The Transaction Log for database 'DB' is full due to 'LOG_BACKUP' Sql Server Error in Event View for AX dynamics D365

This is one of the most common error faced by developers often working with database. This error is very much common for SQL servers as when the LOG size runs out in other words reaches 100% then we encounter this error. Being an AX developer, when the log usage reaches to 100% AX stops working and throw reconnecting request error. For this there is a rapid solution and i have written query for it. Step #1: --this could be use to check you Database log file name and its location use AxDB--in my case AxDB is my Database Name select * from sys.database_files Step #2: --This could be used to see you log space usage for your particular log DBCC SQLPERF (LOGSPACE) Step #3: --In my case Database log file name is D365DB_log --use this query to shrink your log file size USE AxDB; GO -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE AxDB SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (D365DB_log, 1); G