且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

由于加密消息,无法将存储过程添加到数据库

更新时间:2023-02-07 11:33:23

这可能是由 Always Encrypted 功能引起的.

It might be caused by Always Encrypted feature.

如果您不打算使用参数化.您可以在声明变量后手动设置所有变量.
例如:
DECLARE @DB_String varchar(55)
SET @DB_String ='Redesign'

If you are not intend to use parameterization. You can either set all variables manually after you declare them.
For example:
DECLARE @DB_String varchar(55)
SET @DB_String ='Redesign'

或者,您可以右键单击查询->连接->更改连接->选项>>定位到[附加连接参数]页面->在该框区域中,输入:
列加密设置=已禁用
这也将禁用参数化.

Or, you can right click query->Connection->Change Connection->Options>>locate to [Additional Connection Parameters] page->in that box area, put:
Column Encryption Setting = Disabled
That will also disable the parameterization.

如果您确实需要参数化来加密这些变量,那么目前看来您只能在查询级别执行此操作.存储过程不适用于 Always Encrypted,因为它可以被其他设置不同列加密设置的用户调用.

And if you do need the parameterization to encrypted those variables, it seems you can only do it in query level currently. The Stored Procedure does not work well with Always Encrypted, since it can be called by other user which has Column Encryption Setting been set differently.