Migration of SQL server and Safetica server

The following steps describe how to migrate Safetica database and Safetica server.

    Prerequisites

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

    Maintenance scripts: delete_license.dcf, delete_connections.dcf. (download links available in step 2)

    Steps

    1.  Block Safetica Clients from sending new logs and requests to Safetica Management Service
      • Run CMD as administrator
      • Go to C:\Program Files\Safetica Management Service
      • Execute command: STAService.exe -clientport 44388
      • Execute command: restart.bat
      • Keep CMD open

    2.  Run maintenance scripts and redirect Safetica Clients

      • Log into Safetica Management Console
      • Go to Maintenance > Database management > Maintenance tab > Maintenance scripts section
      • Run both scripts (delete_license.dcf and delete_connections.dcf)
      • Go to the Dashboard, right-click the user-tree root, click the Redirect option to define the 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 the backup/restore feature.

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

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

    4.  Attach/restore the database to a new SQL server
      • Open Microsoft SQL Server Management Studio and connect to the new SQL server.
      • Right-click Databases and select Attach – add
      • Navigate to the location of the copied databases and select safetica_data
    5.  Install Safetica server components on the new server
      • Run the universal installer, choose the Manual installation option and start the installation of Safetica Management Service.
      • During the SQL server selection, select the Custom SQL server option, and 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.
    6.  Re-enable the communication with Safetica Clients on the old Safetica server
      • Reattach the old database on the old server. This is necessary to allow the endpoints to download new settings of the redirection
      • Execute command: STAService.exe -clientport 4438
      • Execute command: restart.bat
    7.  Keep the old Safetica server running until all required Safetica Clients are redirected to the new server.

    Exported reports may be lost during migration. To keep them, please copy them to the new server.