Article By:

August 14, 2017

When managing multi sever Dynamics implementations for our clients. It has always been beneficial to disable the automatic database upgrades which occur when you are either doing a full version Dynamics upgrade (ie. CRM 2016 to 365.) or applying patches/updates. If you do not disable automatic database upgrades and you have multiple front ends, what will happen is the database upgrade script will run on your organization multiple times. This will waste time as the database upgrades can take up to an hour depending on your organization size and will add unnecessary database transactions.
After you have disabled automatic database upgrades, you can then apply the application patches only which is fairly quick. Once that’s done, you would do a database upgrade through Dynamics Deployment Manager by right clicking on your organization then clicking upgrade organization.
Below are the powershell commands to view the current settings and also change the settings to disable the automatic upgrade.
How to view the current database upgrade setting:

Add-PSSnapin Microsoft.Crm.PowerShell
(get-CrmAdvancedSetting -ConfigurationEntityName "Deployment" -Setting "AutomaticallyInstallDatabaseUpdates").Attributes

Disable the automatic database upgrade:

Add-PSSnapin Microsoft.Crm.PowerShell
$setting= New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$setting.LogicalName = "Deployment"
$setting.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$keypair = New-Object "System.Collections.Generic.KeyValuePair[String, Object]" ("AutomaticallyInstallDatabaseUpdates", $false)
Set-CrmAdvancedSetting -Entity $setting


Need Assistance?

Speak with an Engineer

Not sure where to start? We're here to help walk you through the process, understand your environment, and provide the guidance you need to achieve cybersecurity maturity. Get in touch today.

Get in Touch