You update databases to take advantage of features in new releases or upgrades of database software. Also, to incorporate enhancements to a database virtual machine (DBVM) or to third party software tools. System administrators manage the base DB template update chain to ensure that users update databases based on templates that comply with defined update policies.

Updates apply enhancements to a DBVM that are not necessarily database software upgrades. You can create a base DB template from an existing version of a database and add third party software tools to the new base DB template. You can then apply the new base DB template to multiple databases by performing a batch update.

Note

When upgrading database software or DBVMs, the resulting upgrade must use the same disk layout as the original DBVM. For example, you must use the same mapping of data, log, and archive disks for the upgraded database as was used for the original database.

The update chain is a property of base DB templates, and determines which base DB templates can be updated from or updated to the current base DB template. You can assign templates with the same database engine (Oracle or vFabric Postgres) to the current template chain. You set the update mode when configuring the template chain.

Update Mode

Determines how databases are updated. You select an update mode according to the capability and update scenario of the destination base DB template. There are two update modes.

In-place update

Modifies the original database files. No additional storage is required and no new files are created during the in-place update process. You use the in-place update mode when updating within the same vFabric Postgres version, that is, when updating from 9.1 to 9.1 or from 9.2 to 9.2.

Dump-restore update

Requires additional storage to finish the update. The process moves the original database to a separate location, and then restores the files to the updated database instance

In the update process, Data Director attempts to run two user defined scripts, the source base DB template preupgrade script, and the target base DB template postupgrade script. To achieve customization in the update process, you must upload a script to the base DBVM before converting it to a base DB template.

Upgrade Scripts

Upgrade Script

Scope

Description

Preupgrade script

Source base DB template

Preupgrade scripts run in the original database before updating. Scripts are located at ${AgentHome}/plugin/${ActivatedPluginFolder}/upgrade_script/preupgrade_script.

For Oracle 11 template, the full path is /opt/aurora/agent2/plugin/vfdd_linux_oracle_11/upgrade_script/pretupgrade_script.

Postupgrade script

Target base DB template

Postupgrade script run in the staging database after the system applies updates, such as new third party tools or database software upgrades. The database instance is started after the post-upgrade script finishes. Scripts are located at ${AgentHome}/plugin/${ActivatedPluginFolder}/upgrade_script/postupgrade_script.

For Oracle 11 template, the full path is /opt/aurora/agent2/plugin/vfdd_linux_oracle_11/upgrade_script/postupgrade_script.

The directory upgrade_script must be accessible and writable to system database administrator users. The script files preupgrade_script and postupgrade_script must be readable and executable to system database administrator users.