--- title: "1570 - How to migrate the SQL database" slug: "1570-how-to-migrate-the-sql-database" updated: 2026-02-03T18:39:34Z published: 2026-02-06T14:06:10Z canonical: "documentation.winmagic.com/1570-how-to-migrate-the-sql-database" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.winmagic.com/llms.txt > Use this file to discover all available pages before exploring further. # 1570 - How to migrate the SQL database How to migrate the SES database to a new SQL Server ## Summary This article provides step‑by‑step instructions for migrating the SES SQL database from one SQL Server instance to another. ## Product Versions Affected All SES versions ## Environment - SQL Server Edition: Express/Standard/Enterprise - All SQL Server versions ## Overview Migrating the SES database is a critical task, as the database stores all configuration data for encrypted devices, users, keys, and certificates. The recommended migration method is: 1. Detach the database from the existing SQL Server 2. Copy the database files to the new SQL Server 3. Attach the database to the new server Before beginning, ensure a full backup of the SES database is taken. ## Prerequisites - Full back up of the SES database - Administrative access to both SQL Servers - SES Console, SDConnex, and ADSync services stopped on the old server # Database Migration Procedure ## 1. Stop SES‑Related Services Before detaching the database, stop the following services on the old server: - SES Console - SDConnex - ADSync ## 2. Identify the Database File Locations 1. Open **SQL Server Management Studio (SSMS)**. 2. Right‑click the SES database → **Properties** → Select **Files**. 3. Scroll right to view the **Path** and **File Name**. - The database consists of two files: **.mdf** (data file) and **.ldf** (log file) ![A computer screen shot of a computer Description automatically generated](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1570---how-to-migrate-the-sql-database-image-q69mm3b6.png) ## 3. Detach the Database 1. In SSMS, right‑click the SES database. 2. Select **Tasks → Detach**. 3. Check **Drop Connections** to disconnect any active sessions. 4. Click **OK** to complete the detachment. ![A screenshot of a computer Description automatically generated](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1570---how-to-migrate-the-sql-database-image-79n7idcq.png) ![A screenshot of a computer Description automatically generated](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1570---how-to-migrate-the-sql-database-image-yph1o38u.png) ## 4. Copy the Database Files to the New Server 1. Navigate to the folder containing the .mdf and .ldf files. 2. Copy both files to the new SQL Server. - If unsure where to place them, check the **Master** database properties on the new server to identify the default SQL data directory. ## 5. Attach the Database on the New SQL Server 1. Open SSMS on the new server. 2. Right‑click **Databases** → **Attach**. ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1570---how-to-migrate-the-sql-database-image-j954zmvy.png) 1. Click **Add** and browse to the copied .mdf and .ldf files. ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1570---how-to-migrate-the-sql-database-image-88cix1uf.png) 1. Click **OK** to attach the database. ## 6. Install and Connect SES on the New Server 1. Install the SES software on the new server. 2. Launch the SES Console and connect to the newly attached database. ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1570---how-to-migrate-the-sql-database-image-wd7x15uc.png) 1. If installing a newer SES version, the database will automatically upgrade during the first connection. 2. Reconfigure: SDConnex, ADSync, SES profiles (update IP/Server name to the new server) ![A screenshot of a computer AI-generated content may be incorrect.](https://cdn.ca.document360.io/93ef9a31-472b-4830-81aa-76199c390cf4/Images/Documentation/1570---how-to-migrate-the-sql-database-image-zxe9nt5q.png) ## 7. Update the Old Server for Client Migration 1. Upgrade SES on the old server. 2. Configure SDConnex on the old server to point to the **new** SQL database. 3. Keep SDConnex running on the old server for **at least one week** (preferably up to one month). - This ensures all client devices receive updated profiles and migrate successfully. 4. After the transition period, identify devices that have not communicated and update their profiles manually. # Scenario: Moving the Database Without Upgrading the SES Server If you are only migrating the database but **not** upgrading SES: ## 1. Record Current Settings Document or screenshot the SecureDoc Services (SDConnex, ADSync, Analytics Engine) settings ## 2. Stop Related Services - Stop all the SecureDoc service - Close the SecureDoc Service Configuration Console ## 3. Backup the Database Perform a full database backup before proceeding. ## 4. Detach and Move the Database 1. Detach the SES database from the old SQL Server. 2. Attach it to the new SQL Server. 3. In SES, select **Create a new connection** and point it to the new SQL Server. ## 5. Update SDConnex Settings Modify SDConnex to reflect the new SQL Server connection details.