How to Update an Uncustomized Schema after an Archibus Upgrade

A new version of Archibus typically includes an updated schema that has been changed to reflect new application features, corrections to existing applications, changes to the Navigator, and so forth.

If you want to use the new application features, you need to update the schema.

This topic has the following sections:

Check the Status of your Database

To get started, first check the status of your database.

To see if you your database is up to date, view your database information from the System / Archibus Administrator - User and Security /View Database Revision Number task. As shown in the below image, review the "Database Update Script" values; these are updated when a database script is run.

Note that the "Archibus Database Version Number" and "Archibus Database Version Date" values have not been updated for the V.24.1 and beyond releases, as scripts are now the standard schema update process for non-custom database schemas. Thus, the best way to track recent schema updates is to review the script information.

Check the Current Database for Issues

Before updating the database, you can check its current state by using the Validate Schema feature of the Update Database Wizard. This action alerts you to violations of "best practice" database conventions. You can then fix any issues before you update the database with new values.

Running Scripts (V.23.2 onwards)

From V.23.2 onwards, you should use the Database Update Wizard's Run Script command to upgrade the database from lower to higher version (by executing all mandatory increment scripts in between). The upgrading should be done starting with the nearest version to your current version, with no skipping.

Each release contains the following scripts:

Script Purpose
update-schema.duw

Applies the schema changes made since the previous version.

Use this if you are upgrading a database from the previous version.

update-database.duw

Runs update-schema.duw and then update-sample-data.duw

Use this when upgrading a demonstration database and you want to have all of the changes that were added to the new version's "HQ" sample database.

update-sample-data.duw

Applies the sample data changes made since the previous version.

Use this if you have a database with a the new schema and want to add the "HQ" sample database data.

These master update scripts call a series of supporting scripts, which add changes for the Archibus platform and for each Archibus domain.

The scripts are useful for Administrators who want:

Administrators might still prefer to use the Schema Change Wizard to review differences between personalized databases and the stock schema. The Schema Change Wizard has tools to analyze the differences, present them, and accept or reject changes singly or in groups. Administrators may also prefer the Schema Change Wizard if they wish to make changes, such as widening fields, before applying them.

Note: To use the scripts on Microsoft SQL Server and Oracle, search the scripts for "SQL Server" and "Oracle," make the adjustments specified in the comments, and then run the script per the instructions above.

Version-to-version database update scripts

Archibus provides version-to-version database update scripts in SQL format. You can analyze the scripts and, if necessary, edit them to match a customized deployment. The historic scripts per database build are found in \projects\users\public\dt\database-update\sqlscripts.

These scripts are generated from upgrading the schema database and will not necessarily be identical to what the Database Update Wizard would do against a production database; for example, they may make updates instead of inserts, and foreign key names may vary.

To use a script

  1. Navigate to the System / Add-in Manager process and select Run Database Update Wizard.
  2. Select the Run Script option and press Next.
  3. Select Server File, enter "projects/users/public/dt/<version number you are upgrading to>" as the location, and press Refresh.
  4. Select the appropriate script:
    • update-schema.duw
    • update-database.duw
    • update-sample-data.duw
  1. Select Run Script.
  2. Restart your application server; alternately, load System / Archibus Administrator - Application Configuration / Configure Application Parameters (ab-activity-params-edit.axvw) and click "Reload All Parameters."
  3. If you use Home Pages, republish them using the System / Add-In Manager / Publish Home Pages by Role view.

DUW Script topics

For more information on DUW scripts, see:

Continuous Database Updates (V.25.1 onwards)

The process of running scripts can be automated. The basic process is for a workflow rule to go through all the scripts in sequence and run each one.

You can choose to run the scripts yourself, as outlined above, or take advantage of this feature once your database is updated to V25.1 format.

For information, see Continuous Database Updates.

Transferring Tables (pre-V.23.2 databases)

The procedure below transfers all tables in your project to another project that has a superset of the first project’s schema. This procedure is for pre-V.23.2 databases.

This procedure is for those sites that have a standard Archibus schema that has not been customized. If you have customized your schema, see How to Update your Customized Schema after Upgrading to a New Version of Archibus.

To read your data into the new superset schema:

  1. Upgrade. Use the separate Package and Deploy Wizard to upgrade your Archibus software, application files, and prototype databases containing the new schema for new Sybase, Microsoft SQL Server, and Oracle projects.
  2. Sign In. Sign in as a Web Central user (e.g. “AFM”) within your existing project database.
  3. Transfer Out. Run the Database Update Wizard. Transfer your data out, specifying to transfer only project-specific tables. The action also extracts all of your document files.
  4. Create. Create a new project database with the new prototypical database schema.
  5. Sign In. Sign in as the same Web Central user within this new project database. If the user name you used before does not exist in the standard Web Central database project, add it.
  6. Transfer In. Run the Database Update Wizard. Transfer your data in. Specify to transfer in only the project-specific tables.

You can now delete the transfer files in the \projects\users\<this user> subfolder.

For information on using the Database Update Wizard's table transfer features, see:

Note: When transferring your data, consider that data is exported and imported from [archibus]\projects\(user). This means that you need to sign in as the same user on both databases. However, if this is not possible (for example, on V.23.1, I sign in as "ai" and on V.22.1 I sign in as "afm"), you can manually modify the folder name. For example, so that the V.22.1 database can read the export from V.23.1, you would rename [archibus]\projects\ai to [archibus]\projects\afm.

Choosing not to Update your Schema

If you upgrade your copy of Archibus to a new version and do not want to take advantage of the new schema, you do not need to run these procedures.

For example, if the new version of Archibus offers an application that your site is not implementing, you do not need to update the schema. With very few exceptions, your applications and extensions will continue to work unchanged even if you do not upgrade your database. If a concern arises, you can see what is in the current revision of the database by reviewing the Database Schema Revision History. This help topic is organized most recent revision first and provides a description of the changes in the database through time.