Migration of SQL server and Safetica Server

The following steps describe a correct procedure to migrate Safetica database and Safetica server.


    Available SQL Management Studio for both old and new SQL server.

    Maintenance scripts: delete_license.dcf, delete_connections.dcf.


    1. Deny clients from sending new logs and requests to the Safetica Management Service
      • Run CMD as administrator
      • Redirect to C:\Program Files\Safetica Management Service
      • Execute command: STAService.exe -clientport 44388
      • Execute command: restart.bat
      • Keep CMD opened
    2. Run maintenance scripts and set up a redirect for clients
      • Open the Safetica Management Console and log in
      • Go to Maintenance -> Database management -> Maintenance, section Maintenance scripts
      • Run both scripts (delete_license.dcf, delete_connections.dcf)
      • Go to the Dashboard, right-click the user-tree root, click the “Redirect” option to define an address to the new Safetica server.
    3. Transfer database files from the old SQL server to the new one.

    //You can do so by copying already existing database files or using backup/restore feature.

    • Open MS SQL Management Studio and connect to the current database server
    • Right-click on database “safetica_data”, select “Tasks – Detach”
    • Check the box “drop connections” and confirm
    • Copy files: “safetica_data”, “safetica_data_log” and “[safetica_data_FG]” to the new SQL server

    //Files are usually located at C:\Program Files\Microsoft SQL Server\MSSQL13.SAFETICA\MSSQL\DATA or similar path. Location may vary, due to the custom installation parameters and SQL version.

    1. Attach/restore the database to a new SQL server
      • Open MS SQL Management Studio and connect to a new SQL server.
      • Right-click on Databases and select “Attach – add”
      • Navigate to the location of copied databases and select “safetica_data”
    2. Install Safetica server components on the new server
      • Run the universal installer, choose option Manual installation a proceed to start the installation of the Safetica Management Service.
      • During the SQL server selection, select the option “Custom SQL server” and then define the connection string to the new SQL server.
      • Install Safetica Management Console, log into the new Safetica server and go through the initial wizard.
    3. Re-enable the communication with clients on the old Safetica server
      • Execute command: STAService.exe -clientport 4438
      • Execute command: restart.bat
    4. Keep old Safetica server running until all required clients are redirected to the new server.