Update the database
To find out the version of your database,
-
from the Watchdoc administration web interface, go to Main menu, Configuration section, > Advanced configuration > Statistics database.
-
In the Statistics section, the version of the database is displayed in the Primary database box:
If the database needs to be updated:
-
Go to the folder where the installation package files were extracted.
-
Unzip the kernelXX folder.
-
In the kernelXX folder, open the SQL folder.
-
Depending on your database type (MSSQL, PostgreSQL, or SQLite), locate the update file(s) [database_type]_update-XX.
-
Perform the update in stages: from the Kernel[version number].zip\SQL folder, run all the [database type]_update_[version] updates between the version installed in your environment and the new version.
For example:
-
if you are starting from v. 5.4 or v. 5.5, you perform 1 update (to v. 6.0);
-
if you are starting from v. 5.2 or v. 5.3, you perform 2 updates (to v. 5.4, then to v. 6.0);
-
A SQL Server database can be updated with two tools :
-
with the MS SQL Server Management Studio® tool:
-
with the command line tool sqlcmd integrated with the database.
Commands examples to execute a script file :
sqlcmd -S localhost\watchdoc -U sa -d watchdocstats -i mssql_update_XX.sql -o QueryResults.txt -e
-
-S : server name
-
-U : login
-
-d : database name
-
-i : script to execute
-
-o : output file
-
-e : add script file commands in the output file
-
-
Once the database has been updated, restart the Watchdoc service so that it can take the database change into account.