DB Refresh for 81+ Services Framework Deployment
This article guides you through the process of a database refresh.
October 1, 2022
AUTHOR(S):
No items found.
Article tags:
No items found.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Share this article
This article is part of THE FOLLOWING SERIES:
Aderant Series

When validating customizations in a TEST environment, it is often desirable to use the most recent data from the PROD environment. Therefore, it is a common requirement to periodically replace the TEST database with a backup of the PROD database.

In this guide, we will discuss the major considerations when performing such a database refresh and the steps to take to minimize risk.

Major Considerations

  1. The Expert Database has several areas where environment resources could be "crossed," leading to some risk when performing a database refresh. Examples include:
  • CFM_CONFIGURATION_VALUE, and CFM_CONFIGURATION_NAME, where custom, environment-specific URLs or file paths can be stored.
  • DDM_PATHS, where environment-specific DocuDraft paths are stored.
  • SQL Service Broker queues managing business eventing messages.
  • Workflow data.

  1. Customization packages are stored in the database, and any customizations that are in the target DB (i.e., the database being overwritten) will be lost during the refresh.

  1. Database and domain customizations will also be lost in the refresh, so it is best to ensure tha there is a functioning DEV database that acts as the system of record for customization packages prior to refreshing the TEST database.

Steps

  1. Extract/Save all customization content or data in the target DB.

Note. See Major Considerations 2 and 3.

  1. If a TEST deployment already exists, save a copy of the environment manifest from Deployment Manager.
  • Run deployment manager as administrator.
  • Select target environment.
  • Choose Advanced Options from the ribbon bar.
  • Click on Export in the bottom left.
  • Save to an appropriate location on the disc: e.g., C:\AderantExpert\Install.
  • Exit out of dialogs and Deployment Manager.

  1. Back up the source DB.

  1. Back up the target DB.

  1. Back up any target destination deployment files:
  • ExpertSource, typically located at: C:\Aderant\Deployments\<Destination Deployment Files> on the deployment machine.
  • ExpertShare, located at the path indicated in the Environment tab of Deployment Manager.
  • Target Application Server Files, typically located at C:\AderantExpert on the application servers, but the direct path can be accessed from the "Role Servers" dialog on the Expert tab of Deployment Manager.

  1. Close all open files in the ExpertShare for the target environment.

  1. Remove the existing target deployment by opening Deployment Manager and selecting "Remove" from the Ribbon.

  1. Delete the ~\<Environment Name>\Services\Workflow directory on the test application servers, where "~" is the path from step 5c above.

  1. Clear all connections/transactions to the target DB.

  1. Restore the target DB from a backup of source DB created in step 3.

  1. Delete target ExpertSource files that were backed up in step 5a.

  1. Copy the source ExpertSource files into the target ExpertSource location.

  1. Run the clear environment SP, which ships with Expert:

  • exec ClearEnvironmentFromDatabase
  • @workflowDatabaseName='<TARGET DATABASE NAME>',
  • @preserveWorkflowData = 'Y'

Note. If you are not interested in preserving workflow definitions, you can also pass 'N' as the flag to @preserveWorkflowData.

  1. Ensure that the owner of the database is CMSDBO:
  • sp_changedbowner 'CMSDBO'

  1. Run SQL from Appendix 1 to clear Workflow instances.

  1. If the database has been restored form a different database server, remap the server logins using SQL from Appendix 2.

  1. Copy the workflow directory from one of the source app servers to all of thre target app servers.

e.g. \\SOURCEAPPSERVER\e$\AderantExpert\SOURCE\Services\Workflow to\\TARGETAPPSERVER\e$\AderantExpert\TARGET\Services\Workflow

  1. Deploy target environment.
  • Run deployment manager.
  • Select target environment from the ribbon bar or select Add if destination environment has not been set up before.
  • Click OK when manifest missing prompt appears.
  • When the environment wizard appears, click on Import and choose the environment file created in Step 2, or use the wizard if destination environment has not been set up before.
  • Select No when prompted to deploy.
  • Verify settings.
  • Correct Monitoring Database Name.
  • Deploy.

  1. Execute SQL script on the target database to link all workflow definitions to the new environment manifest:

Update WFM_WORKFLOW_DEFINITION set ENVIRONMENTID = (Select ID from FWM_ENVIRONMENT)

  1. Verify deployment by checking Service Monitor or using the Validate Environment button from the Deployment Manager ribbon menu.

  1. Check successful deployment:
  • Run configuration manager.
  • Run Expert Time.
  • Other Services Framework apps used by firm.

  1. Change DocuDraft paths using SQL from Appendix 3.

  1. Copy DDTEMPLT and DDVIEWS folders from source to target location as needed if files have changes.

Appendix 1

?

Appendix 2

?

Appendix 3

?

The process is now complete!

Don't miss any update on this topic.
Sign up for our newsletter to receive a personalized collection of our most recent articles, blog posts, videos, and more, curated specifically for you based on your interests.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.