Updating a QEST Platform Database
Applies to All
This article describes the process of upgrading a QEST Platform database when upgrades of the QEST Platform products are undertaken.
Contents
- 1 Overview
- 2 Prerequisites
- 3 Process
- 3.1 Connection
- 3.1.1 First Time Use
- 3.1.2 Subsequent Usage
- 3.1.3 Changing Connections
- 3.2 Upgrading
- 3.2.1 Optional Files
- 3.2.2 Running a Package
- 3.2.2.1 Opening the File
- 3.2.2.2 Passing Requirements Checks
- 3.2.2.3 Starting the Package
- 3.1 Connection
- 4 Troubleshooting
- 4.1 Connect error
- 4.1.1 Resolution
- 4.2 Requirements check failed
- 4.2.1 Resolution
- 4.3 Database Version fail
- 4.3.1 Resolution
- 4.4 Package Version fail
- 4.5 QN Version 4.4 Update fail
- 4.1 Connect error
Overview
New versions of QEST Platform products are often accompanied by structural or data changes to the QEST Platform database. The QEST Script Runner product is used to:
Connect to the QEST Platform database
Run the script package files provided by Spectra QEST to
Carry out any necessary pre-upgrade database tasks
Perform the core structure and database updates for the new QEST Platform version
Carry out any necessary post-upgrade database tasks
Prerequisites
The following must be present in the target environment in order to update a QEST Platform database:
QEST Script Runner must be installed on a machine that can access the QEST Platform database
db_owner access to the QEST Platform database for the user QEST Script Runner will use to access the QEST Platform database
QEST Script package file(s) to run against the QEST Platform database.
For a product update there will be up to three package files
(Optional) Pre-upgrade, usually named preinstall-project_V.M.B.R.qestscriptpackage (where V is the major version, M the minor release version and B and R are the build and revision numbers)
Upgrade, named QEST Platform Database Upgrade V.M.B.R.qestscriptpackage
(Optional) Post-upgrade, usually named postinstall-project_V.M.B.R.qestscriptpackage (where V is the major version, M the minor release version and B and R are the build and revision numbers)
The QEST Script Runner can also be used to run a single SQL file or a standalone script package, in which case the file to be run will be needed
This guide assumes that an update is being carried out.
Process
Connection
In order to update a database, QEST Script Runner must first connect to the target database.
First Time Use
When first launching the QEST Script Runner, the user will be prompted to define a new connection.
The following details will be required:
Server Name: The SQL server or instance name. This can be typed in directly or, if the drop down is used, QEST Script Runner will provide an option to browse for servers
Authentication: The type of authentication to use when connecting to the selected SQL server or instance.
If Windows Authentication (default) is used then the Windows user running the QEST Script Runner application will be connecting to the SQL server and QEST Platform database.
If SQL Authentication is used then a SQL User Name and password will need to be provided in order to log into the server and access the database
Database: The name of the QEST Platform database to connect to. This can be typed in directly or, if the drop down is used, QEST Script Runner will search for accessible databases on the designated SQL server or instance.
Subsequent Usage
On subsequent uses of the QEST Script Runner, any recently used connections for the current Windows user running the application will be listed in the Recent drop down. Selecting one of the available options will pre-fill the connection details used previously.
Changing Connections
Once a connection to a database has been established it can be changed by using the change connection option next to the connection name. This option is useful if a connection has been established to the wrong environment.
Upgrading
In order to upgrade a QEST Platform database, the provided pre-upgrade, upgrade and post-upgrade files must successfully be run to completion using the QEST Script Runner in that order.
Optional Files
Not all implementations of the QEST Platform require pre-upgrade or post-upgrade packages. If these have not been provided it is safe to assume they are not necessary for the given QEST Platform implementation. If these files have been provided, however, they must be run.
Running a Package
Running a QEST Script Package file consists of the following steps:
Opening the File
A script package file can be opened in the QEST Script Runner by one of three methods:
By using the Menu -> Open Script Package option and navigating to the relevant qestscriptpackage file
By dragging the relevant qestscriptpackage file into the QEST Script Runner window
By double clicking the qestscriptpackage file (installing QEST Script Runner
Passing Requirements Checks
Package files will come with some verification steps in order to determine whether or not it is safe to run the included scripts. These verification steps are run once a file has been opened in QEST Script Runner and success or failure is reported in the application.
If the requirements checks have passed, the script package can be started. If the checks have failed refer to the Troubleshooting section below. If there is any uncertainty about continuing please contact Spectra QEST.
Starting the Package
Clicking the Start button will apply the current package to the database to which the connection has been established. Progress will be reported in the console along with any problems encountered. If an error is encountered the script package will stop and the last error message retained in the output. Some errors will provide guidance on how they encountered problem should be rectified. If there is any uncertainty about continuing please contact Spectra QEST.
Troubleshooting
Connect error
When attempting to connect to a database, an error message similar to the below appears:
Failed to connect to database server.
System.Data.SqlClient.SqlException (0x80131904): Cannot open database "QESTLab_Test" requested by the login. The login failed.
Login failed for user 'jane.doe'.
Resolution
Confirm that the current user has access to the database.
Requirements check failed
The requirements check failed when selecting a script package.
Resolution
Show details if they are hidden.
Read failure details to determine the check which has failed.
Database Version fail
Package version is older than the current database version.
Resolution
The package should not be run, as the database has already been upgraded to a newer version than this package.
Package Version fail
The package should not be run as this package has already been run on the database.
QN Version 4.4 Update fail
The package should not be run as the database will need to be upgraded with an earlier version first. In order to run this package the database must first be upgraded to version 3.7 or later using QESTNET.Upgrade.
If unsure of the exact failure issue, please contact Spectra QEST Help Desk with failure details.
Integrity | Curiosity | Empathy | Unity
The content of this page is confidential and for internal Spectra QEST use only. Do not share, duplicate or distribute without permission.