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
First Stop all YSoft SafeQ services.
Backup YSoft SafeQ Databases (for YSoft SafeQ 5 are default names SQDB5 and SQDB5_SQDW).
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:
<SafeQ>\conf\cmldb.conf:
Specify path to the new database in dbURL parameter. Path is written in following format:
dbURL = jdbc:jtds:sqlserver://[computer name ]:[port]/[DB name];instance=[instance name];ssl=request
dbURL = jdbc:jtds: sqlserver://SERVER8:1433/SQDB5;instance=SQLEXPRESS;ssl=request
Specify connection details to the new MS SQL server in parameters dbIp, dbPort and dbName
Specify database login and password in dbUser and dbPass parameters
You can encrypt password in Text encryption widget on Dashboard of YSoft SafeQ web interface
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
<SafeQ>\conf\cmldb-sqdw.conf
Follow the same procedure as for cmldb.conf with the following exceptions:
parameter sqdb-srvname and sqdb-dwsrvname shall not exist in this file
<SafeQ>\conf\cmldb-cluster.conf
Follow the same procedure as for cmldb.conf with the following exceptions:
parameter sqdb-srvname and sqdb-dwsrvname shall not exist in this file
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.