Updating the Database on a Ms Sql Server Version 13.0.1.1 and Higher

Updating the Database on a Ms Sql Server Version 13.0.1.1 and Higher

UPDATING THE DATABASE 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 Databases 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 database server. 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 Microsoft 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 transaction log 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 partition. 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.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    17 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us