--- title: "Fortanix DSM with Microsoft SQL Server TDE - Backup & Restore" slug: "fortanix-dsm-with-microsoft-sql-server-tde-integration-backup-restore" updated: 2026-09-09T15:36:54Z published: 2026-09-09T15:36:54Z canonical: "support.fortanix.com/fortanix-dsm-with-microsoft-sql-server-tde-integration-backup-restore" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.fortanix.com/llms.txt > Use this file to discover all available pages before exploring further. # Fortanix DSM with Microsoft SQL Server TDE - Backup & Restore ## 1.0 Introduction This article describes the step-by-step procedure to backup and restore the **Microsoft SQL server Transparent Data Encryption (TDE)** enabled database, which is protected by **Fortanix-Data-Security-Manager (DSM)**. To perform the restoration, the target database MSSQL Server must point to the same asymmetric key, which was previously created on the source database MSSQL Server. When TDE is enabled on a database, its backup files are also encrypted. The following error appears on the screen when the user tries to restore a TDE-enabled database backup on a different server: ![ERROR_DIALOG_BOX.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159846200980.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=DtUF%2Fg3blEarmjvoAVjq0EKUnD%2BVkjCtlieHSDIkEYA%3D) **Figure 1: Error dialog box** > [!NOTE] > NOTE > > Ensure that you have performed the steps from the [*Data Security Manager with Microsoft SQL TDE Integration – Before You Begin*](https://support.fortanix.com/docs/data-security-manager-with-microsoft-sql-server-tde-integration-before-you-begin). ## 2.0 Backing Up the Data from Source This section lists the steps for backing up your database from the source server. This backup contains the data in encrypted format, including the Data Encryption Key (DEK) protected by the Fortanix master key. In the given example, we will use the database name as `employee` and we are backing it up from the Object Explorer or T-SQL command. 1. Right-click the desired database (`Company`). 2. Select **Tasks** and click **Back Up** from the context menu. ![TAKE_BACKUP_OF_SOURCE_SERVER.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159846582804.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=4Ngiw4d8sorWbVvxSbyiFHoLn6sKqPVN57ju%2BunP7UU%3D) **Figure 2: Take backup of source server** 1. Select the backup path. ![SELECT_THE_BACKUP_PATH.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159846540692.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=K5h6nQaXx%2BL7nj0g6hSfiyCfy4bmid84f%2Bo%2FE1shhoc%3D) **Figure 3: Select the backup path** 2. Backup completed successfully. ![BACKUP_COMPLETED.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159845895828.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=xV6te7jzgeTyhGkbGI7MW9xoAFJRHYKsIjbN0guyyeU%3D) **Figure 4: Backup completed** 3. Move the backup database to the target server. 4. Log in to the secondary target server. ## 3.0 Configuring TDE on Target Server ### 3.1 Enabling SQL Features Run the following commands if Extensible Key Management (EKM) is not supported or enabled in the SQL server edition: ```bash sp_configure 'show advanced', 1 GO RECONFIGURE GO sp_configure 'EKM provider enabled', 1 GO RECONFIGURE GO ``` ![RUN_COMMANDS_FOR_ERROR_SCENARIO.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159847380372.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=DcPZ7NA%2FpmjAgjtL0YhXO6OVbz7yGLZToSupb76Ggxc%3D) **Figure 5: Run commands for error scenario** ### 3.2 Creating Cryptographic Provider Run the following commands to use the correct location of the `EKM DLL`: ```bash CREATE CRYPTOGRAPHIC PROVIDER EKM_Prov FROM FILE = 'C:\Program Files\Fortanix\KmsClient\FortanixKmsEkmProvider.dll' ; GO ``` Where, `EKM_Prov` is the name of the provider defined by the user. ![CREATE_CRYPTOGRAPHIC_PROVIDER.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159851233940.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=MZDJu55iXoeJZaQfuptxRCH%2FAjuRoaX6Swol1GM10Ms%3D) **Figure 6: Create a cryptographic provider** ### 3.3 Creating Credentials This section describes the steps to create the credentials to generate the master key on the Fortanix DSM using the SQL admin. 1. Run the following commands to create a credential in your SQL Server Studio that will be used by the system administrators: ```bash CREATE CREDENTIAL sa_ekm_tde_cred WITH IDENTITY = 'Identity1', SECRET = '' FOR CRYPTOGRAPHIC PROVIDER EKM_Prov ; GO ``` Where, `<DSM_API_KEY>` is the Fortanix DSM API key as copied in [*Fortanix Data Security Manager with Microsoft SQL Server TDE Integration - Before You Begin*](https://support.fortanix.com/docs/data-security-manager-with-microsoft-sql-server-tde-integration-before-you-begin#35-copying-the-api-key). ![](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/Screenshot (867).png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=sjCw9o71MLeLO5OYxwyy5qFSxvdaxUf%2FCKBLBE1Zwn0%3D) **Figure 7: Create credentials** 2. Add the credential to a highly privileged user, such as your own domain login, in the format `[DOMAIN\login]`: ```bash ALTER LOGIN EC2AMAZ-1RDPAEU\Administrator ADD CREDENTIAL "sa_ekm_tde_cred"; GO ``` Run the following commands in case there is no domain, and the machine is part of a workgroup or standalone: ```bash ALTER LOGIN LOCALHOST\Administrator ADD CREDENTIAL "sa_ekm_tde_cred"; GO ``` ![COMMAND_FOR_NO_DOMAIN.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159847039124.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=Qd0FBmxpXUZhDBaDlIFO8h4Anvjxgcn4m2JMySc53ho%3D) **Figure 8: Command for no domain** If you are not an administrator and hence unable to alter the login, open the Object Explorer and map the credentials as shown in the following image: ![MAP_CREDENTIALS.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159847265940.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=q8olmU1LCacx3pBqrSpEwjkGU6G%2B%2BE3AeURvRqYql2o%3D) **Figure 9: Map credentials** ### 3.4 Creating an Asymmetric Key The MSSQL admin has the credentials associated with creating the Master Encryption Key (MEK) on the Fortanix DSM. This section describes the steps to create the asymmetric key from the existing key in the Fortanix DSM. Run the following commands to create an asymmetric key stored inside the EKM provider: ```bash USE master CREATE ASYMMETRIC KEY ekm_login_key FROM PROVIDER EKM_Prov WITH PROVIDER_KEY_NAME='SQL_Server_Key', CREATION_DISPOSITION = OPEN_EXISTING; GO ``` Where, - `ekm_login_key` is the key name on the SQL server created on the source server. - `SQL_Server_Key` is the key name on Fortanix DSM created on the source server. ![CREATING_ASYMMETRIC_KEYS.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159846147604.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=bnwbR47kwyMcZNc9KQSJPjn2SY9RIxQya7dxrWcE9IY%3D) **Figure 10: Creating an asymmetric key** ### 3.5 Creating Credentials (DB Engine) Run the following commands to create a credential that will be used by the database engine: ```bash USE master; CREATE CREDENTIAL ekm_tde_cred WITH IDENTITY = 'Identity2', SECRET = '' FOR CRYPTOGRAPHIC PROVIDER EKM_Prov; ``` Where, - `ekm_tde_cred`: The name of the credentials. - `Identity2`: The identity name. The value can be any name. - `EKM_Prov`: The Fortanix EKM Provider. - `SECRET`: The Fortanix DSM API key as copied in [*Fortanix Data Security Manager with Microsoft SQL Server TDE Integration - Before You Begin*](https://support.fortanix.com/docs/data-security-manager-with-microsoft-sql-server-tde-integration-before-you-begin#35-copying-the-api-key). ![CREATE_CREDENTIAL_FOR_DATABASE_ENGINE.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/Screenshot (865).png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=VE2kinzEdssmQXTtPFxgO6NAeuTh2sZGz1wxRK0JDDE%3D) **Figure 11: Create credential for database engine** ### 3.6 Creating Login (DB Engine) Run the following commands to add a login used by TDE and add the new credential to the login: ```bash CREATE LOGIN EKM_Login FROM ASYMMETRIC KEY ekm_login_key ; GO ALTER LOGIN EKM_Login ADD CREDENTIAL ekm_tde_cred ; GO ``` Where, - `ekm_login_key`: The master key alias on the MSSQL Server database. This key is already created in [*Section 3.4: Creating an Asymmetric Key*](/v1/docs/fortanix-dsm-with-microsoft-sql-server-tde-integration-backup-restore#34-creating-an-asymmetric-key). - `EKM_Login`: The login name. - `ekm_tde_cred`: The key created on the Fortanix DSM. This credential is already created in [*Section 3.5: Creating Credential (DB Engine)*](/v1/docs/fortanix-dsm-with-microsoft-sql-server-tde-integration-backup-restore#35-creating-credentials-db-engine). ![ADD_NEW_CREDENTIAL_TO_LOGIN.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159845894036.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=C5VdqqrsAx7%2F%2FFWOSO4iEvv%2BEVdlSFr0dRZ2iTvo0lM%3D) **Figure 12: Add new credential to login** ## 4.0 Restoring the Encrypted Database This section describes the steps for restoring the encrypted backup on the target server. When the backup is encrypted with TDE at the time of restoration, the database tries to unlock the DEK using MEK. The SQL server starts the restoration process only if the respective master key is available on the database. ![RESTORING_DATABASE.png](https://cdn.us.document360.io/c3bd85d2-4ad8-4d85-9f60-f1c168a3aad9/Images/Documentation/13159847392532.png?sv=2026-02-06&spr=https&st=2026-11-23T10%3A10%3A45Z&se=2026-11-23T11%3A10%3A45Z&sr=b&sp=r&sig=FXl2A0AW%2FoEE4CpyN5BMqGa9hZQo48ZNG4Sw3UQJu64%3D) **Figure 13: Restoring database** Fortanix Data Security Manager (DSM) is the world’s first cloud service secured with Intel® SGX. With Fortanix DSM, you can securely generate, store, and use cryptographic keys and certificates, as well as other secrets such as passwords, API keys, tokens, or any blob of data. Your business-critical applications and containers can integrate with Fortanix DSM using legacy cryptographic interfaces (PKCS#11, CNG, and JCE) or using the native Fortanix DSM RESTful interface. ## Related - [Fortanix DSM with Microsoft SQL Server - Always Encrypted](/fortanix-dsm-with-microsoft-sql-server-always-encrypted.md) - [Fortanix DSM with Microsoft SQL Server TDE - Advanced](/fortanix-dsm-with-microsoft-sql-server-tde-integration-advanced.md) - [Fortanix DSM with Microsoft SQL Server TDE - Before You Begin](/fortanix-dsm-with-microsoft-sql-server-tde-integration-before-you-begin.md) - [Fortanix DSM with Microsoft SQL Server TDE - Introduction](/fortanix-dsm-with-microsoft-sql-server-tde-integration-introduction.md)