After installing any update rollup for Dynamics CRM, the changes take place immediately, and all the organisations in that CRM server are updated to the latest rollup. During the installation, the images, webpages and assemblies for Dynamics CRM are modified accordingly as also the changes for the databases for the various organisations.
Why defer Database update
However, there might be situations where you might have multiple organisations in a single CRM Server; for example a test organisation along with some more development organisation. Here you’re likely to want to apply the update rollup to a single CRM organisation initially. And then after you’ve tested and confirmed that everything works fine for you, update the remaining organisations. You can achieve the above scenario by executing a windows P0werShell script in the CRM Server to defer database update. Executing this script will prevent the organisation databases from being automatically updated on rollup installation. You can go to the “Deployment Manager” and manually update the organisations you wish to. Remember, the script needs to be executed before you install the update rollup.
Executing the PowerShell script
Open up Windows PowerShell console and copy paste the following script:
$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
Hit Enter to execute it. What this script basically does is it sets the value of “AutomaticallyInstallDatabaseUpdates” to “false”, hence deferring the database update. Once you’ve executed the script, you might want to check if the script actually worked (since you don’t have any output on executing it). So, you can run the following script and see for yourself.
(get-CrmAdvancedSetting -ConfigurationEntityName "Deployment" -Setting "AutomaticallyInstallDatabaseUpdates").Attributes
Now you can go ahead and install the update rollup. You’ll find that the part where the organisation updates are done would not be carried out now. That will be left for you to carry out manually.
Manually updating the Organisations
Open up the “Deployment Manager” and you’d find that the available organisations have an update pending, as stated in the “Update” column.
To manually update each Organisation, you can right click on it and select “Update”.
Pages: 1 2