Questions tagged [always-encrypted]

Always Encrypted is a feature of Microsoft SQL Server 2016 and Azure SQL Database, designed to protect sensitive data. It allows client applications to encrypt sensitive data without revealing the encryption keys to the database engine, so the data cannot be accessed either in flight, in server memory, or at rest.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Root CA for Hyper-V virtual TPM Endorsement Key required for setting up Always Encrypted

I'm trying to setup Always Encrypted with Secure Enclaves in a lab environment using Hyper-V. HostKey attestation is straightforward, but I'm struggling with TPM mode. My setup is a Hyper-V host VM ...
user avatar
2 votes
3 answers
402 views

SQL Server Management Studio throws exception when using Always Encrypted

With the latest version of SSMS (v18.10), when we choose to sign in to Azure to use key vault, it always gives this exception: Rotate (Microsoft.SqlServer.Management.ServiceManagement) And the error ...
user avatar
0 votes
0 answers
115 views

How to get a encrypt information from a SSAS Database using Power BI?

I have a database encrypted in my SQL Server instance. To be specific,I used the feature 'Always Encrypted' to encrypt two columns from that database. This database has a relation with a database with ...
user avatar
2 votes
1 answer
421 views

Error while querying 'Always encrypted' column

I have set up 'Always encrypted' on one of the column in Azure SQL DB. Everything worked well except when a user is trying to access he is getting below error. ' I have tried some of the rememdies as ...
user avatar
1 vote
0 answers
93 views

Error when trying to apply Always Encrypted encryption on aspnet_Membership table

I'm trying to encrypt the Email and LoweredEmail columns on a SQL database using Always Encrypted encryption using SSMS and I always get the same error: Lock request time out period exceeded. There ...
user avatar
0 votes
2 answers
294 views

Backup and restore SQL Server database with encrypted columns: what should I backup along with database?

Assume I've backed up a SQL Server database with Management Studio, and that database have some encrypted columns. Now I want to restore this database into another fresh-enrolled MSSQL server. To use ...
user avatar
  • 101
3 votes
1 answer
1k views

Always Encrypted: How do I do an equality join with a non-encrypted column to a deterministic encrypted column?

The official Microsoft documentation for Always Encrypted on SQL Server 2017 states: Deterministic encryption always generates the same encrypted value for any given plain text value. Using ...
user avatar
0 votes
1 answer
430 views

How do we restore database configured with Always Encrypted between environments and enable web app to encrypt/decrypt data?

I have a SQL Server 2016 database configured with AE in Production environment. Column Master key Certificate is available(under Windows Certificate Store -> Local Machine location) in a different ...
user avatar
  • 293
0 votes
3 answers
433 views

Always Encrypted on Sql 2017 Express Edition

I am so tentative to decide to use Always Encrypted tool, however I have a question → I'm working on a project with SQL Server 2017 - 14 Express Edition. And I'm pretty sure they aren't going to buy ...
user avatar
1 vote
1 answer
234 views

Always Encrypted Data Validation [closed]

Just a question in how could i validate duplicate data's in my database if columns is set to be encrypted(deterministic) in db? I've tried running the following code, but receive the error below. ...
user avatar
  • 29
0 votes
1 answer
94 views

How to Configure Always Encrypted using PowerShell

I just want to ask if there is a way to configure always encrypted columns using power shell? like for example i want to encrypt a column in a table with deterministic using powershell codes?
user avatar
  • 29
0 votes
1 answer
242 views

Database backup and restore incase Always Encrypted feature is enabled

I would like to know that How SQL database backup and its restoration on other server will work if Always Encrypted feature is implemented on most of its tables? Thanks
user avatar
  • 65
1 vote
1 answer
37 views

Does AE certificate include both master and encryption keys together?

After setting up Always Encrypted, I can see a certificate in my Current User when selecting select * from sys.column_master_keys under the key_path I see this location, but there is no location ...
user avatar
  • 2,006
0 votes
1 answer
163 views

Domain Certificate Authority Generated Certificate and SQL Server - Keyset does not exist

I do not have much experience with certificates or certificate terminology, so I may be incorrect in how I title things. I am trying to use a domain issued certificate as the certificate used in the ...
user avatar
  • 169
1 vote
1 answer
127 views

SQL Server Security - Encryption [closed]

I have requirement to store the some sensitive information in SQL Server 2016. Organization policy demands, it should be encrypted. Business Requirement: Data cannot be decrypted by DBA. Data cannot ...
user avatar
1 vote
1 answer
1k views

Why does setting my column as Always Encrypted change its collation from SQL_Latin1_General_CP1_CI_AS to Latin1_General_BIN2?

I am encrypting a VARCHAR(50) NULL column as randomized. When doing this, the collation is changed from SQL_Latin1_General_CP1_CI_AS to Latin1_General_BIN2. I cannot find any resources explaining why ...
user avatar
  • 169
1 vote
0 answers
545 views

SSIS: Error from ODBC provider when inserting into Always Encrypted table using CMK in Azure Key Store

I'm trying to use SSIS (Visual Studio 2017) to insert data into an Azure SQL table with a column that's encrypted via Always Encrypted, and a column master key stored in Azure Key Vault, but I keep ...
user avatar
2 votes
1 answer
540 views

Always Encrypted column validation

How can I validate a SSN column that is encrypted in a table using AE without passing one by one value as a parameter? I have to validate if the SSN is formatted properly and numbers and '-' etc. I ...
user avatar
  • 99
0 votes
0 answers
326 views

Azure sql database backup and exporting data-tier application

Currently i have an azure subscription in it has a server and a database. How could i setup azure SQL database backups that will run automatically for example every 15 mins? is there a way? if yes ...
user avatar
  • 29
0 votes
1 answer
172 views

SQL Server Always Encrypted - Create an external table containing an encrypted column

I'm trying to create an external table MyTable on server S2 that references the table MyTable from server S1. The table MyTable contains a column encrypted using Always Encrypted. I'd like the column ...
user avatar
0 votes
0 answers
286 views

Always Encrypted returning Timeout error

I am trying to encrypt a number of tables (1 column in multiple tables) in two different databases. On Database A I manage to encrypt these, while on database B it fails with an error: 'Unable to ...
user avatar
  • 21
2 votes
1 answer
7k views

AlwaysEncrypted error when inserting via stored proc

lets start with the error first: Encryption scheme mismatch for columns/variables . The encryption scheme for the columns/variables is (encryption_type = 'PLAINTEXT') and the expression near line '3' ...
user avatar
0 votes
1 answer
57 views

Does the Always Encrypted certificates get copied over in availability groups?

We have a column set up with Always Encrypted, and we are adding it to an AG. We'd like for the encryption to keep working if/when we have to fail over to a secondary server. Will the Availability ...
user avatar
  • 2,968
0 votes
1 answer
76 views

Data Security in MS SQL Server

How do I store the sensitive information on SQL server?. We have policy guidelines, DBA and Development engineers are not allowed to view the data as plain text. I am aware of the encryption ...
user avatar
0 votes
1 answer
170 views

Is it possible to store Always Encrypted master key an on-premises key vault? [closed]

I want to store the master key in a centralize key vault and have IIS access the key from there. I know I can use Azure Key Vault or local Windows key store, but I was looking for another option to ...
user avatar
1 vote
0 answers
409 views

Case insensitive search on Always Encrypted columns

How would one go about doing a case-insensitive search on a column encrypted with Always Encrypted? The problem arises when you encrypt email addresses for example. When encrypted, John.Doe@gmail.com ...
user avatar
  • 173
0 votes
1 answer
160 views

Microsoft Key Storage Provider for Always Encrypted Master Key

Hoping someone can help- I've been experimenting with Always Encrypted columns and have generated a certificate in the "Microsoft Software Key Storage Provider" - How can I remove the "...
user avatar
0 votes
1 answer
301 views

Replicate encrypted data from Sybase ASE 15.5 to Sybase ASE 15.5

Recently I'm studying on how the replication of encrypted data works from Sybase ASE to Sybase ASE, and I have few queries on below:- What will be the datatype for columns that contain encrypted data ...
user avatar
  • 23
1 vote
0 answers
460 views

How to create encryption certificate using PowerShell in Windows Server 2012 R2?

I'm implementing the Always Encrypted feature in SQL Server 2016. I have tried to create the certificate using PowerShell in Windows 10 environment as per the below article. https://docs.microsoft....
user avatar
  • 293
0 votes
1 answer
68 views

How to remove an installed AE certificate from server using PowerShell Scripts?

I have created the encryption certificate using below PowerShell script in dev. environment. Now, I need to create deployment document to configure the encryption on staging environment. $cert = New-...
user avatar
  • 293
3 votes
1 answer
13k views

Always Encrypted: How to insert or update encrypted columns?

I have configured 'Always Encrypted' on one of the columns of a table of my SQL Server database. I am able to select and view data from client SSMS after passing the 'Column Encryption Setting = ...
user avatar
  • 357
1 vote
0 answers
39 views

Always Encrypted 'where' on multiple values

I understand why SQL won't allow this, I want to know if there is some way around this that will allow me to do a where on an encrypted column with multiple values? I have tried to use a TVP, but SQL ...
user avatar
  • 173
0 votes
1 answer
839 views

Always Encrypted - Lock request time out period exceeded

I'm trying to encrypt a column and am getting the following error: Set-SqlColumnEncryption : Lock request time out period exceeded. Are there parameters to specify the lock timeout? What could be ...
user avatar
-2 votes
1 answer
1k views

Type clash on update of always encrypted varchar in ssms 2017

I am using SSMS 17.6 and I am trying out the Always Encrypted feature. I was able to update/insert/search a datetime field by declaring a parameter and then using the parameter, e.g.: DECLARE @...
user avatar
  • 99
0 votes
1 answer
379 views

Always Encrypted after restoring an old database backup using C#

I have a Windows Form application. It allows users to restore a SQL Express database. Latest version of SQL Server in app now is SQL Server 2017. Customer can restore an old backup of a SQL Server ...
user avatar
2 votes
1 answer
87 views

how to encrypt one column of a table without using always encrypted?

I have been working on a solution to synchronise logins (using T-SQL) between 2 servers, or between AlwaysOn nodes, inspired by sqlsoldier. It requires a linked Server. When run, this procedure ...
user avatar
0 votes
1 answer
462 views

Always Encrypted Certificate clarification

I have configured AE using SSMS on the database server installed with SQL Server 2016. The certificate created under Local Machine option displays the validity as one year. I just want to know what ...
user avatar
  • 293
1 vote
1 answer
228 views

Always encrypted on Temporal tables

Is it now possible to apply Always encrypted to some columns on existing Azure SQL database temporal tables with existing data ? I know it was not possible a few months ago thru SSMS / powershell.
user avatar
  • 11
1 vote
1 answer
2k views

Is It Possible to Encrypt varbinary(max) Column Using Always Encrypted Feature?

We want to implement the Always Encrypted feature for our application database. There is a table with a varbinary(max) column which is storing binary data of images, pdf documents, etc. Does the ...
user avatar
  • 293
2 votes
1 answer
940 views

How to create Always Encrypted Certificate for specific time period?

I have configured Always Encrypted on a custom database using SQL Server 2016. By default, it creates the certificate with a validity of one year. Is there any workaround to create this certificate ...
user avatar
  • 293
-1 votes
1 answer
106 views

Does Always Encrypted cause blocking queries or locking object?

I have perform some test with relatively small tables and the encryption took a very long time (maybe because there are many SQL objects that are referring the target table). I am wondering(worrying)...
user avatar
  • 3,619
2 votes
1 answer
957 views

sp_refresh_parameter_encryption fails to refresh objects

I am testing always encrypted feature and once the operation of encrypting column is done I have a file with hundreds objects failed to be refresh by the sp_refresh_parameter_encryption procedure. ...
user avatar
  • 3,619
2 votes
1 answer
1k views

Exporting certificate without private key

I am using the following PowerShell code to create a certificate that can be used as Column Master Key for Always Encrypted feature: New-SelfSignedCertificate -Subject "...
user avatar
  • 3,619
1 vote
2 answers
518 views

Securing Always Encrypted SQL Server from "sa"

I'm currently studying SQL Server Always Encrypted feature. How can I disable column decryption to "sa" if all they have to do is add Column Encryption Setting=enabled in the login's additional login ...
user avatar
0 votes
2 answers
1k views

How to rotate the CMK of Always Encrypted using SSMS?

I have implemented the encryption in SQL Server 2016 using Always Encrypted. I want to know how to rotate the column master key after the initial one year validity using SQL Server Management Studio ...
user avatar
  • 293
4 votes
1 answer
3k views

How to renew or extend the CMK Certificate in Always Encrypted feature?

I have implemented Always Encrypted feature in SQL Server 2016. The CMK is valid for one year. How do I renew it, or extend the validity?
user avatar
  • 293
3 votes
2 answers
2k views

Encryption of Data, Log and Backup files using Always Encrypted in SQL Server 2016

When we implement the Always Encrypted feature in SQL Server 2016, do the .mdf files, .ldf files and .bak files get encrypted as well? I would like to know if the data/log/backup files gets encrypted ...
user avatar
  • 293
8 votes
1 answer
2k views

Combining Always Encrypted AND Column level encryption in SQL Server 2016

We have requirements to encrypt sensitive column data using SQL Server 2016 and selected the Always Encrypted(AE) feature to encrypt those columns using deterministic approach.. Since, the AE ...
user avatar
  • 293
6 votes
2 answers
1k views

Can SQL Server Always Encrypted be used for temporary tables?

I'm trying to determine if I can use Always Encrypted on a column in a temporary table (SQL Server 2016 SP1 Enterprise on Windows 2016). I've tried as follows: CREATE TABLE #listofdates (compare_dt ...
user avatar
1 vote
1 answer
371 views

Error 71501, 71561 while encrypting columns using always encrypted feature of SQL Server 2016

1) I am trying to encrypt some varchar columns which are not identity / primary using the always encrypted feature of SQL Server 2016, but getting an error code 71501,71561 for unresolved and / or ...
user avatar