问题标签 [always-encrypted]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ssms - 更新 SQL Server 2016 中的加密列
我在 SQL Server 2016 中有两个加密列,我想更新这 2 列的值。
我在Microsoft Always Encrypted 页面上读到,为了能够更新加密列,它“至少需要 SQL Server Management Studio 版本 17 才能插入、更新或过滤加密列”。所以我查看了 SQL Server Management Studio (SSMS)下载页面,目前用于生产的版本是 v16.5.3。我能看到的唯一 v17 是 17.0 RC3,它有一条评论说“不推荐用于生产用途”。我们的运营团队不太愿意使用这个版本,因为不推荐。我们的 C# 代码可以对这些列进行更改,但更新生产源代码并不是一个简单的过程,我们只是想修复这些加密列中的一些数据。
所以问题是没有 SSMS 版本 17,有没有办法更新 SSMS 中的 SQL erver 2016 加密列?
c# - Always Encrypted column - LINQ query Equals not working
I have encrypted SSN column using Always Encrypted feature in SQL server 2016. When I try to get the encrypted column in LINQ I always get error. I tried equals and contains but got the same error.
The data types char(9) encrypted with (encryption_type = 'DETERMINISTIC', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256',..are incompatible in the equal to operator. Statement(s) could not be prepared.
SSN,InputSSN - string in DB - SSN CHar(9) Latin1_General_BIN2
asp.net - Update always encrypted column from decrypted column
I would like to encrypt an existing database column with always encrypted. My project is a ASP.NET project using code first and database is SQL Server. The database has already data. I created a migration to achieve my goal.
First I tried to alter the column type, using the following.
I got the following error.
Then I decided to created another column and migrate the data.
And I got the same error.
After I looked at this, I noticed that it is possible to insert data like the following
But if I try to obtain the value from my existing column, it fails.
The error follows.
Does anyone knows how can I achieve my goal?
Update 1
@Nikhil-Vithlani-Microsoft did some interesting suggestions.
- Always Encrypted Wizard in SSMS - I would like to achieve my goal with code first migrations, so this idea does not fit.
- SqlBulkCopy - It does not work inside migrations, because the new column will only exist after all 'Up' method is run. Therefore we cannot insert data into this column in this way inside this method.
Anyway, his suggestions drove me to another attempt: obtain the decrypted values and update the encrypted column with them.
In fact, I did not try to create another column and to migrate the data, as mentioned in an example above. I tried it only on SSMS. And now I got a different error.
I tried to do it without encrypting the new column, and it worked properly.
Any idea why this error occurs?
case-statement - 始终加密 - SQL Server 2016 如何在加密列上使用用户案例语句
我已经使用 SQL Server 2016 中的始终加密功能对现有表列进行了加密。我现有的查询很少失败,因为我们在 where 子句、LEN 和子字符串函数中使用了 case 语句。有人可以告诉我如何在始终加密的列上使用这些函数。我收到以下错误 -
子串(SSN,2,5)
列/变量“SSN”的加密方案不匹配。列/变量的加密方案是 (encryption_type = 'DETERMINISTIC', e... 期望它是 (encryption_type = 'PLAINTEXT') (或更弱)。
.net - Can we use dbCommand and AddInParameter while inserting always encrypted columns
Is there any way we can use dbCommand and AddInParameter while inserting always encrypted columns into table through .net?
db.AddInParameter(dbCommand, "@SSN", DbType.string, SSN);
sql-server - 始终加密 列加密密钥如何缓存?
有谁知道纯文本 CEK 是如何缓存在内存中的?它是否存储为 SecureString?可以使用内存转储窃取密钥吗?
sql-server - 内存优化表 + 加密和身份列
我想知道是否可以始终加密Memory Optimized Table
并自动播种其主密钥?例如,我想创建以下内容:
相当简单的表并且最初创建得很好但是,当我尝试加密列时,Bar
我得到以下异常。
2017 年 4 月 21 日 09:23:00 [错误] WorkitemExecution:消息:内部异常:System.Data.SqlClient.SqlException 详细信息:当 IDENTITY_INSERT 设置为 OFF 时,无法在表“Foo”中插入标识列的显式值。
我也尝试SET IDENTITY_INSERT Foo ON
在 create table 语句之后进行设置,但仍然没有运气。
阅读文档似乎并不表明这是不可能的,但也许我错过了什么?如果这是不可能的,我有另一种我知道会起作用的方法。
我想我的问题总结是.. “内存优化表是否支持始终使用标识列加密”。
c# - asp.net core mvc 连接字符串
我在我的天蓝色 sqlserver 数据库上使用“始终加密”,我使用的是 SqlParameter,.Net Framework 4.6 但是当我使用这个连接字符串时:
我收到以下错误:不支持关键字:“列加密设置”。
azure-sql-database - 使用 powershell 插入数据
我们有一个由插入语句组成的静态 sql 文件;基本上是测试数据。是否可以在启用了 alwaysencrypted 的 azure sql db 上使用 powershell 执行此脚本。我们使用 keyvault 来存储证书。
sql-server - 如何在加密列中插入 NULL/空字符串 - 始终加密
我已经使用 SQL Server 2016 始终加密方法加密了现有数据,我们拥有的列之一是 NULLABLE,但是从屏幕插入时它不接受 NULL 或空字符串。如果屏幕上不强制加密列,如何使其工作?