CML - How to move Microsoft SQL database to the new server

This document describes how to move Microsoft SQL database from YSoft SafeQ server to another server.

This article consists of:

/*<![CDATA[*/ div.rbtoc1633072971386 {padding: 0px;} div.rbtoc1633072971386 ul {list-style: disc;margin-left: 0px;} div.rbtoc1633072971386 li {margin-left: 0px;padding-left: 0px;} /*]]>*/

Requirements

New Microsoft SQL database server should fit these parameters:

  • For database synchronization the user named sync must exist.

  • Users sync security definition: sysadmin or db_owner role for SQDB5 and SQDB5_SQDW

  • SQL Server Browser service must be started in order to grant connection to database from another server also you need to enable TCP/IP protocol in SQL Server Network Configuration.

Backup and restore YSoft SafeQ Databases  

  1. First Stop all YSoft SafeQ services.

  2. Backup YSoft SafeQ Databases (for YSoft SafeQ 5 are default names SQDB5 and SQDB5_SQDW).

  3. Restore both backed up databases on new Microsoft SQL database server.

Run validation of YSoft SafeQ Databases

  •  Run the following SQL query on both restored YSoft SafeQ databases in order to clean up database validator tables:
    delete from smartq_validator

Edit configuration files on the YSoft SafeQ server

Following configuration files should be modified as follows:

  1. <SafeQ>\conf\cmldb.conf:

    1. Specify path to the new database in dbURL parameter. Path is written in following format:

    2. Specify connection details to the new MS SQL server in parameters dbIp, dbPort and dbName

    3. Specify database login and password in dbUser and dbPass parameters

      1. You can encrypt password in Text encryption widget on Dashboard of YSoft SafeQ web interface

    4. Specify path to SQDB5 and SQDB5_SQDW databases parameters sqdb-srvname and sqdb-dwsrvname. The server name can be found by running the following query on the server: 
      SELECT name FROM sys.servers
      Database path is stored in format [computer name]\\[instance name], for example:

      • sqdb-srvname=SERVER8\\SQLEXPRESS

      • sqdb-dwsrvname=SERVER8\\SQLEXPRESS

  2. <SafeQ>\conf\cmldb-sqdw.conf

    1. Follow the same procedure as for cmldb.conf with the following exceptions:

      1. parameter sqdb-srvname and sqdb-dwsrvname shall not exist in this file

  3. <SafeQ>\conf\cmldb-cluster.conf

    1. Follow the same procedure as for cmldb.conf with the following exceptions:

      1. parameter sqdb-srvname and sqdb-dwsrvname shall not exist in this file

      2. specify database login and password for "sync" user in dbUser and dbPass parameters.

Check System health on the target server

Start all YSoft SafeQ services :

  • YSoft SafeQ CML

  • YSoft SafeQ CML DBS

  • YSoft SafeQ Terminal Server

  • YSoft SafeQ LDAP Replicator Service

  • YSoft SafeQ Web Interface

Check database integrity status at "Database integrity" widget on Dashboard of SafeQ web interface. All lines have to be marked as OK. If you can see an error, see logs for more details.

Check <SafeQ folder>\logs\cml.log for errors.