Upgrading a Database Schema

After upgrading a CM4D Installation, you may have databases from one or more schema versions back that you want to access. To access those databases, you need to migrate the databases to the latest schema version using the upgrade path(s) below.

Before you begin the upgrade process, you will need to answer the following questions:

Are you upgrading a Site Database?

1.     Yes - Along with upgrading the CM4D Site database schema, you will also need to upgrade any CM4D DataSource databases that are managed by the CM4D Site database to the corresponding CM4D DataSource database Schema.

2.     No - Upgrade your unmanaged CM4D DataSource databases to the correct CM4D DataSource database Schema.

Are you using Oracle or SQL Server?

1.     Oracle - Please review the following recommendations before upgrading an Oracle database schema.

a.     When an Oracle database is created or modified, to avoid potential errors, the procedures should be compiled.

b.     A DB Administrator needs to review the scripts and the current tablespaces prior to execution of update scripts.

c.      Tables that have been renamed with OLD are not deleted by the update scripts, but should be deleted by the DB administrator after the migration has been validated.

d.     Prior to running an update that requires a table migration, ensure temporary and rollback table spaces have sufficient size to support the updates.

2.     SQL Server - After all of the required Update scripts are run, you must run the Grant scripts to give the Public database role the appropriate privileges on any newly created objects.

What is the version of your current Database(s)?

1.     Single-Schema Upgrades - If you are upgrading to the newest version of CM4D from the previous version of CM4D, you will only need to run the latest upgrade script(s) on your database(s).

2.     Multiple-Schema Upgrades - If you are upgrading to the newest version of CM4D from a version older than one release, you will need to run all intermediate update scripts on your database(s) consecutively before updating to the latest Schema version.

How to Update a Database Schema

The following steps are a general guideline for upgrading your database Schema.

1.     Backup existing database(s)

2.     Determine current database Schema

3.     Run update scripts

4.     Check database connection

Backup Existing Database(s)

Before executing any update scripts on your database(s), it is very important that you create a backup of your existing database(s). Once you have confirmed that the backup process was successful and complete, continue on to the next step.

Determine Current Database Schema

All Schema upgrades must start with your current database Schema. If you do not know your current Schema, select your database type below to see instructions for finding the Schema version.

SQL Server

Run Update Scripts

To upgrade the CM4D Schema version that is used by the new version of CM4D, you must run the appropriate Update scripts in sequential order. The update scripts will be provided along with the CM4D installation when you receive your upgrade.

Upgrading a SQL Server Database Schema

Upgrading an Oracle Database Schema

To see an example of upgrading a SQL database from Schema 14a to v19a, click here.

Site Schema Upgrade Path

Use the following upgrade path(s) to upgrade your Site Database(s). Starting with your current Site database Schema version, run each script sequentially until you reach the latest Schema version.

Click to expand Site Schema upgrade paths >

CM4D DataSource Schema Upgrade Path

Use the following upgrade path(s) to upgrade your CM4D DataSource(s). Starting with your current CM4D DataSource database Schema version, run each script sequentially until you reach the latest Schema version.

Click to expand CM4D DataSource schema upgrade paths >

Check Database Connection

Once your database Schema has been upgraded, check that CM4D can connect to the database.

1.     Run DbConnect.exe.

2.     Click the Test Connection button.

If you have successfully connected to the database, your Schema upgrade is complete.

Related Topics

↑ Top