问题描述
加密存在于两个列中的列的最佳方法是什么?表(BUID) 在2012服务器上的两个不同的数据库中, 最后应该能够连接跨数据库的两个表之间的加密列。
What is the best method to encrypt a column that exists in two tables (BUID) in two different database on a 2012 server, at the end should be able to join on the encrypted columns between two tables across databases.
使用testdb1
create table table1
(BUID number(10),
ACCOUNT_BALANCE Money)
use testdb1
create table table1
(BUID number(10),
ACCOUNT_BALANCE Money)
使用testdb2
创建表table2
(BUID编号(10),
CUSTOMER_FNAME varchar2(30),
CUSTOMER_LNAME varchar2(30))
Create table table2
(BUID number(10),
CUSTOMER_FNAME varchar2(30),
CUSTOMER_LNAME varchar2(30))
基本上想要加密两个表中的BUID并能够创建一个视图 加入两个数据库。
basically want to encrypt the BUID in both tables and be able to crate a view that joins across two databases.
创建视图vw_cust_balance
as
选择
a.buid,
a.account_balance
b.customer_fname,
b.customer_lname
来自testdb1..table1一个内部联接testdb2..table2 b b
a.buid = b.buid
create view vw_cust_balance
as
select
a.buid ,
a.account_balance
b.customer_fname,
b.customer_lname
from testdb1..table1 a inner join testdb2..table2 b
on a.buid = b.buid
有人可以指向我解决上述情况的资源或示例。
Can someone point me to a resource or example that resolves situation above.
推荐答案
以下链接需要:
1) http://www.sqlsafety.com/?p=15
2) https://docs.microsoft.com/en-us/sql/relational-数据库/安全/加密/加密一列数据?view = sql-server-2017 (i
没有这个支持sql server 2012的信息)
2)https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/encrypt-a-column-of-data?view=sql-server-2017 (i have not information this support sql server 2012 or not)
我认为最好的方法是创建没有buid列的视图。为访问用户提供此视图并拒绝访问表。因为在你的decyption过程中高负载cpu。这是糟糕的表现。
I think that best way create view without buid column. Give access user this view and deny access table. Because in your decyption proccess high load cpu. This is bad performance.
这篇关于如何在连接两个不同数据库中的两个表的列上设置加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!