Database updater

R4 systems from 2019-07-18 will be switched to use new sql updater.

The new updater is the same updater as is used in 365 system.

Before you begin

  • Make sure that database is fully updated with old updater. Last updates deployed were on 2019-07-18

  • Make sure that user running updates is a member of [af_updater] database role.
    ALTER ROLE [af_updater] ADD MEMBER []

  • User applying updates should be in database_managers table

  • User applying updates should have full permissions to sys namespace (create, alter, drop)

  • In order to use web sql updater, Pims Web Server should have access to on port 443, otherwise you should use Win project Sql Updater

  • To avoid any issues with permissions, we recommend refreshing all permissions
    sstp_Database_Maintenance_ApplyPermissions2 @all = 1

  • Web app is using server side updates download, win project - client side.

R4 system switch overview

Old updater will deploy updates until "2019-07-18". After this date, when you open "Appframe updates" form you should see label with link to this article ad link to SQL Updater win form.

After deploying all updates from the old updater the following stored procedure needs to be run: sstp_Database_Maintenance_ApplyPermissions2 @all = 1

First time, run SQL Updater

SQL Updater UI has web app, but for the first time, before site upgrade, you must use Win project SQL Updater, which will look similar to web app

Usual upgrade

Usual upgrade can be done in article /db-updater or Win project SQL Updater.

  • Download - will download all available updates.
  • Apply - will apply downloaded updates.

If during an update an error is thrown, it should be fixed and then the status changed to 0 for that update.

After update completes

After running download and apply the system will be upgraded.

Web articles, scripts and etc, will update only Appframe hostname. To update your site, you will need to use Updating Website sys objects procedure, described below.

If you have production only hosts you should update them using procedure bellow.

Updating Website sys objects (Pimp my site)

This can be achieved in 3 ways:

  • Direct procedure call: sstp_WebSiteCMS_PimpMySite @SourceHost = 'Appframe', @TargetHost = @TargetHost
    • @TargetHost - site id which needs to be upgraded
  • Using win client. Choosing target site, then Appframe ->Web Setup->WebSite ->Update Sys Objects. As copy from site "Appframe" should be selected.
  • Using web /SiteSetup app. Site -> Update sys objects

Updating Production only host

To update production only host a following stored procedure needs to be run: exec sstp_WebSiteCMS_PublishAllSystemObjects @SourceHostname = @SourceHostname

  • @SourceHostname - production site id which needs to be updated

Update source database

  • In order to make your database as a update source, Website Anonymous user should have view permissions on stbl_System_CompatibilityLevel and stbl_Database_Deployment_SqlUpdate