<<

UPDATING THE ON A MS SQL SERVER VERSION 13.0.1.1 AND HIGHER

CONTENTS

1 Preface & Motivation ...... 3

2 Targets ...... 4

3 Approach ...... 5 3.1 Update strategy ...... 5 3.1.1 About Unicode in version 12 ...... 5

4 Flow chart of a database update ...... 6 4.1 Extended approach for text/configuration/licence database ...... 6

5 Detailed instructions ...... 7 5.1 Generating a script to update the values database to Unicode ...... 7 5.2 Switching the database to be updated to Unicode ...... 9 5.3 based on the “full” recovery model ...... 9 5.4 Generating script(s) to update the structure of all databases ...... 10 5.5 Updating the structure of the database to be updated ...... 11 5.6 Updating the contents of the configuration and text database ...... 12

6 Known Issues ...... 17

QDas-654 v-0.2 1 2/17

1 PREFACE & MOTIVATION

Q-DAS software is provided with Access databases by default; these are simple “database files” that, however, only apply to a limited scope since their technology is restricted. There are three (four since version 12) different databases serving various purposes (to put it simple).

• Configuration database QDAS_CONFIG contains all settings of the Q-DAS system

• Text database QDAS_TEXT contains all texts in all languages of the Q-DAS system

• Values database QDAS_DATA contains all measured values and additional data

• Since version 12: licence database QDAS_LIC contains any licence information

In addition, we provide the QDAS_MONI and QDAS_CMM databases by default; however, they are basically nothing but values databases for specific applications.

Especially the contents of the QDAS_DATA values database are sometime subject to frequent changes and/or grow quickly exhausting the restricted possibilities of Access databases in the short or medium term. This is the reason why many users of Q-DAS software switch to a values database on a MS SQL Server (or MS SQL Express) or Oracle database server1.

This manual is to help Q-DAS users with Q-DAS databases on MS SQL Server or MS SQL Express and who want to update them to Q-DAS version 13.0.1.1 and higher.

Note: For a better readability, we only refer to MS SQL Server in the following chapters. The same facts always apply to MS SQL Express.

1 In addition to Access, Q-DAS supports the database interfaces MS SQL Server (or MS SQL Express) and Oracle.

QDas-654 v-0.2 1 3/17

2 TARGETS

This manual describes the general approach to updating Q-DAS databases (of any version) to version 13 and higher.

This manual only refers to databases running on an MS SQL server. It does not apply to Oracle database technologies. However, the approach is basically the same.

A successful update requires that a Q-DAS product of version 13.0.1.1 or higher is already installed and that this product includes the respective function.

In addition, you have to ensure that the Q-DAS product is able to communicate with the . A new system requirement Q-DAS software since version 12 needs to communicate with MS SQL databases, is the MS SQL Server Native Client. It is included in the setup of Q-DAS software and has to be installed on all computers having a server or client installation of Q-DAS software that shall connect to the SQL server. The Native Client not being installed is the reason for many problems in the connection between Q-DAS software and the SQL DB server.

QDas-654 v-0.2 1 4/17

3 APPROACH

This chapter gives a brief overview of the update strategy in order that you get an impression of the steps you have to take.

3.1 Update strategy

Since version 13, Q-DAS software offers the ”Static DB“ tool that is compiled for each new version and knows the structure and design of the databases and their default contents.

The “Static DB“ tool compares the structure of the databases to the static model. It will identify any differences between this model and the database to be updated if they are based on different versions. The “Static DB“ will include some more tables and/or columns and/or indices than the database to be updated since it is always based on the latest version.

After completing the comparison, you may use the result (the differences) to generate a SQL script conducting the structural update. This script applies to the database to be updated and adds the missing tables/columns/indices respectively. The update has been successful in case the structures of both databases are the same. You may now start to update the contents (of the configuration databases and the text database).

3.1.1 About Unicode in version 12

Any existing productive Q-DAS values database < version 12 may be capable of Unicode or not. The reason is that SQL scripts for the creation of values databases applied to generate reference databases for updates were provided for databases capable of Unicode as well as for databases not capable of Unicode in all versions older than version 12. These scripts also served their original purpose in the past, of course, and helped you create one or several values databases on a MS SQL server.

In the long run, however, we want to supply nothing but uniform values databases capable of Unicode. The first step we take is to provide creation scripts for databases capable of Unicode only starting with version 12. We strongly recommend you use the update to switch to a values database capable of Unicode. The detailed instructions given in the following also shows you how to do it.

From a technical perspective, you may still apply a values database that is not capable of Unicode; however, this is not recommended and we do not offer any associated support.

An update to Unicode must always be based on the values database. Text/configuration/licence databases are excluded.

QDas-654 v-0.2 1 5/17

4 FLOW CHART OF A DATABASE UPDATE

The following flow chart shows you how to update one values database. You have to repeat all these steps for each values database you want to update.

Start

Create backup of existing values database

Use “Static DB“ to generate Unicode script

Switch DB to Unicode by using the script

Use “Static DB“ to generate update script

Update DB structure

Apply update script to this very DB

4.1 Extended approach for text/configuration/licence database

You have to use the DB-Update tool subsequently to update the contents of any other database type.

QDas-654 v-0.2 1 6/17

5 DETAILED INSTRUCTIONS

5.1 Generating a script to update the values database to Unicode

Start the Tools Launcher. It offers the link to the Static DB tool. In case you want to start the update later, even though a new version already exists, you may even select a later version of the Static DB tool in the Tools Launcher in order that the tool matches the applied program version.

Select the “Data” database type.

Click the “Create Unicode Script“ button to open the “DB-Connection” dialogue box. Use it to select the DB- TYP MSSQL, the database server and the database. In case of MSSQL databases, you use the “Test Connection“ button to check the connection.

QDas-654 v-0.2 1 7/17

The “Encryption“ is negligible since the system does not save the DB connection but only applies it temporarily.

Click on “OK” in the “DB-connection” dialogue box and the system asks you to select a storage location for the update script.

QDas-654 v-0.2 1 8/17

5.2 Switching the database to be updated to Unicode

Use this script in SQL Server Management Studio to update the database to Unicode.

5.3 Databases based on the “full” recovery model

You may skip this chapter if

• the database is not based on the “full” recovery model.

• you have already generated and executed a script to update the database to Unicode and the script has been executed completely at once.

When you update a database based on the “full” recovery model to Unicode, the size of the increases considerably. In case the size of the transaction log is limited, you might reach the upper limit, especially when you update “huge” databases2. The same applies to the hard disk .

In case you reach the upper limit of the log file or the hard disk partition, the SQL server stops the “update to Unicode” script and rolls back the translation of the last field or the last field that has not been translated completely.

You may continue the update where it stopped; however, there is even an option to ensure that the update does not stop at all. The following sections describe three different strategies of how to deal with the “full” recovery model.

• Standard strategy: The same approach as described in chapter 5.3. Apply it to update a “small” database (usually up to 20 GB without any problems).

• Alternative strategy: Use it to ensure that the script does not stop. Set the recovery model of the database to “simple” before you execute the script.

2 Strictly speaking, we cannot clearly distinguish between small and huge databases. Of course, it always depends on the ratio between the database size and the log/partition size whether the script is executed completely or not. To put it simple, we give specific sizes in this chapter all the same. The aim of this chapter, however, is to create a general understanding of this issue and to provide solutions in the situation described above. This gives you the option to specify an individual limit.

QDas-654 v-0.2 1 9/17

5.4 Generating script(s) to update the structure of all databases

You now generate the scripts to update the structure for all databases provided that they are running on MSSQL, the values databases that might previously updated to Unicode and the text/configuration/licence database included.

You do not have to update the licence database in case you upgrade V11 or older to version 13 since version 11 and older did not include an own licence database.

Start the “Static DB” tool. Select the database type.

Click the “Create Unicode Script“ button to open the “DB-Connection” dialogue box. Use it to select the DB- TYP MSSQL, the database server and the database. In case of MSSQL databases, you use the “Test Connection“ button to check the connection.

QDas-654 v-0.2 1 10/17

The “Encryption“ is negligible since the system does not save the DB connection but only applies it temporarily.

Click on “OK” in the “DB-connection” dialogue box and the system asks you to select a storage location for the update script.

Choose a reasonable file name.

Repeat the same steps for all other databases (provided that they are running on MSSQL).

5.5 Updating the structure of the database to be updated

Use the associated script in Microsoft SQL Server Management Studio to update the structure of the respective database.

Repeat this approach for all other databases (provided that they are running on MSSQL).

QDas-654 v-0.2 1 11/17

5.6 Updating the contents of the configuration and text database

Before starting the update, you have to establish the database connection to the MSSQL databases in version 11.

Start the Tools Launcher. It offers the link to the Database Connect tool. In case you want to start the update later, even though a new version already exists, you may even select a later version of the Database Connect tool in the Tools Launcher in order that the tool matches the applied program version.

For a new installation of version 13 (or upgrade of V11 and older to version 13):

Select the QDAS_CONF_001 standard connection; for text it is QDAS_TEXT_001.

Open it by clicking the “Open” button.

QDas-654 v-0.2 1 12/17

And adjust it to the respective MSSQL connection.

In case you have already updated version 12 to version 13, it can be assumed that all database connections are correct.

An *.INI file is specified in the DB-Update tool to read the database connections.

QDas-654 v-0.2 1 13/17

The …PLANT\_TEMPLATE_V13\Databases subfolder contains the new databases of V13 server provisioning.

QDAS_CONFIG.MDB and QDAS_TEXT.MDB are renamed by adding “new” to the file name.

They are now stored in the current “Databases” folder.

To prove that we used the Access templates to update the MSSQL databases and not the Access databases, the databases that are no longer required are deleted.

QDas-654 v-0.2 1 14/17

Start the Tools Launcher. It offers the link to the Database Update tool. In case you want to start the update later, even though a new version already exists, you may even select a later version of the Database Update tool in the Tools Launcher in order that the tool matches the applied program version.

A dialogue box opens. Specify the path to the V13_Master.INI.

Check the “Text” and “Configurations” boxes.

QDas-654 v-0.2 1 15/17

The update of the text database starts first.

The update continues with the configuration database.

QDas-654 v-0.2 1 16/17

6 KNOWN ISSUES

When you execute the update script and a duplicate key error appears for the Station index or for the Station.dbo (indicated by error number 1505), the Station.dbo contains duplicates. To fix this error, you have to cleanse Station.dbo provided that

• the Station_Part.dbo table is completely empty (no test plans are assigned to the stations)

• the Transmit_Header.dbo table is empty (change history disabled).

In case one of these tables contains some data, please contact Q-DAS or the System Integration team of Q- DAS.

In case the update script stopped, but you were able to correct the error, please start the database comparison for a second time to generate a new update script. This script will be adapted to the current status of your database that has partially been updated. Execute this script.

QDas-654 v-0.2 1 17/17