> ## Documentation Index
> Fetch the complete documentation index at: https://docs.futurex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure Microsoft SQL Always Encrypted

> High-level procedural guide covering CMK/CEK generation, column encryption, and verification steps for SQL Server Always Encrypted.

Perform the following tasks to configure this integration:

## Generate a CMK

Perform the following steps to generate a Column Master Key (CMK):

<Steps>
  <Step>
    Open Microsoft SQL Server Management Studio.
  </Step>

  <Step>
    Connect to the SQL Server.
  </Step>

  <Step>
    Open your database, and go to **Security**> **Always Encrypted Keys**> **Column Master Key**. Right-click and select **New Column Master Key**.
  </Step>

  <Step>
    In the **New Column Master Key** window, enter a name and select **Key Storage Provider (CNG)** in the **Key Store** drop-down list.
  </Step>

  <Step>
    Select **Futurex CNG** in the **Select a provider** drop-down list.
  </Step>

  <Step>
    Select **\[ Generate Key ]**.

    <Check>
      Your key appears in the window after creation.
    </Check>
  </Step>

  <Step>
    Select **\[ OK ]** to save and close.
  </Step>
</Steps>

## Generate a CEK

Perform the following steps to generate a Column Encryption Key (CEK):

<Steps>
  <Step>
    Under the same database, go to **Security**> **Always Encrypted Keys** > **Column Encryption Key**. Right-click and select **New Column Encryption Key**.
  </Step>

  <Step>
    Enter a name for the key. Then, select the CEK you generated in the previous section in the drop-down list.
  </Step>

  <Step>
    Select **\[ OK ]** to finish.
  </Step>
</Steps>

## Encrypt columns

Perform the following steps to encrypt columns with **FXCNG**:

<Steps>
  <Step>
    Under the database, expand **Tables**. Right-click on the table you want to encrypt and select **Encrypt Columns**.
  </Step>

  <Step>
    In the **Always Encrypted** wizard, on the **Introduction** page, select **\[ Next ]**.
  </Step>

  <Step>
    In the **Column Selection** page, select the **columns** you want to encrypt, select the **Encryption Type**, and set the **Encryption Key** to the CEK you generated in the previous subsection. Then, select **\[ Next ]**.
  </Step>

  <Step>
    In the **Master Key Configuration** page, select **\[ Next ]**.
  </Step>

  <Step>
    In the **In-Place Encryption Settings** page, select **\[ Next ]**.
  </Step>

  <Step>
    In the **Run Settings** page, select **Proceed to finish now**, and select **\[ Next ]**.
  </Step>

  <Step>
    In the **Summary** page, select **\[ Finish ]**.

    <Check>
      When the encryption is complete, a green checkmark displays next to Performing Encryption Operations. You can view additional information by selecting Always Encrypted Wizard Log Report.
    </Check>
  </Step>

  <Step>
    Select **\[ Close ]** to finish.
  </Step>
</Steps>

## View the encrypted columns

To view the clear data for encrypted columns, perform the following steps to enable encryption in the **Server Management Studio** launcher.

<Steps>
  <Step>
    Open Microsoft SQL Management Studio.
  </Step>

  <Step>
    Go to the **Always Encrypted** tab.
  </Step>

  <Step>
    Select the **Enable Always Encrypted (column encryption)** checkbox.
  </Step>

  <Step>
    Connect to the server with the administrative user you used to configure **Always Encrypted**.
  </Step>

  <Step>
    When you run your first query, a dialog box appears, prompting you to enable **Parameterization**. Select either **\[ Enable ]** or **\[ Close ]**. You can modify this setting later under **Query**> **Query Options** > **Advanced**.
  </Step>

  <Step>
    Query your encrypted table.

    <Check>
      The encrypted data displays in plain text.
    </Check>
  </Step>
</Steps>
