Show TOC

Function documentationUpgrade Database

 

The Upgrade Database function is the method used to make the changes to an existing client database that are required to allow the database to work with newer versions of Transactionware applications. The upgrade process applies SQL scripts to the database that could add or change stored procedures, tables, triggers or any database object that has to be altered as a requirement for enhancements or changes to software.

It is very important to make sure the currently running database is backed up. If the upgrade process fails the database would be left in a state that would be incompatible with the old version of the software but also incompatible with the new version of the software. Having a backup would allow you to restore the environment to its state before the upgrade process was started. The first thing that happens when selecting to upgrade the database is the response window is displayed.

You must decide whether or not you wish to backup the database. If you have not done so manually it is highly recommended you do so now. The backup process will take several minutes depending on the size of your database.

If you press the No button the database will not be backed up. If you press the Yes button the backup database process, as described in the Backup section, is invoked and the database is backed up.

From the Select Upgrade Package dialog box select the zip file associated with the new version of the software.

Because there are many customers at different levels and version number in the window title to the highest version number in the zip file name. For instance if the window title indicates your database is version 8.0 you should repeat the upgrade process for update_backoff_80.zip, update_backoff_80b.zip, update_backoff_80c.zip, update Because there a many customers at different levels and versions of software the DBTools application includes all zip files required to update the database since the first time the applications were shipped to now. The files are all named the same except the version number.

Look at the title of the main DBTools application window. You will see the version number of the database in the title of the window. You should apply all zip files starting from the the first one you need, in order. Don’t worry about running the upgrade process twice. Any script file that has already been applied to the database will not be applied again.

All the script files that need to be applied to the database are listed in the Select Upgrade Script box.

Each one of the script files listed must be applied to the database in order to upgrade the database correctly. Although it is possible to apply each script file individually it is not necessary. A script file is included with the upgrade that will automatically apply all listed script files to the database. The script

file name corresponds to the upgrade zip file name and is part of the list at the right of the Select Upgrade Script window. In the example above, the script file that will automatically apply all changes to the database is already been selected.

Starting the upgrade process

Once the upgrade process has started the sections on the left of the window will begin to change. The top part (in grey) shows the actual script that is being applied to the database.

The bottom part (in white) displays all messages. Most of the messages are for information only so don’t be alarmed if you see a message that says an object already exists.

All messages written to the window are also written to a log file called db.log located in the DBTools application default directory.

The last thing the upgrade process will do is to update the database version number and the compatibility number.