我需要一个Server数据库的副本。该数据库有大约40个连接到其他数据库的视图,我也需要这些视图中的示例数据。而且,视图是加密的,所以当我尝试从其中一个视图生成脚本时,这是一个错误:
Property TextHeader is not available for View '[dbo].[TABLE1]'. This property may not
exist for this object, or may not be retrievable due to insufficient access rights. The
text is encrypted. (Mic
我在试图附加一个数据库时出错,该数据库的文件以前是通过EFS加密的。实际错误消息是
Msg 5120, Level 16, State 101, Line 9
Unable to open the physical file "C:\test.mdf". Operating system error 5: "5(Access is denied.)".
如果我解密了这些文件,那么我就可以成功地附加数据库。我正在使用相同的域用户谁进行了加密。有什么想法吗?
我可以使用什么加密协议或算法来为每个用户加密/解密数据库表的一个列的子集?
例如,假设我有一个包含50列的数据库表
col1, col2, col3, col4......col50
现在我想公布这些数据
user1 can see (have access to) col15 and col17 only at time t1 and
user2 can see (have access to) col7, col9 and col20 only at time t1
user3 and user4 can both see data only in col40 at time t1.
在Visual 2013中的部署后脚本中有以下内容:
-- Drop existing role and create again to be up to date
DROP ROLE payments_data_access_role
GO
CREATE ROLE payments_data_access_role
GO
但是,当我从VS发布数据库时,会发现角色'payments_data_access_role‘不存在的错误。
我如何重写它,以便如果角色存在,删除该角色,然后重新定义该角色?
谢谢。
更新:--我尝试了以下方法,它成功了:
IF IS_ROLEMEMBER (