bomba94
bomba94

Reputation: 11

Encrypt an entire table SQL Server

I've just received a question from my boss to encrypt an entire table, stored in SQL Server 2012.

The problem is that, in this table, we store some personal information that not even the database administrator has to see. We have also several application which work with the data in this table, so I will appreciate if there is a method to hide the data both with ODBC access and with SQL Query Access via SQL Server Management Studio, without changing these applications.

Can anyone tells me the solution? Thank you very much

Upvotes: 1

Views: 485

Answers (2)

user170442
user170442

Reputation:

If you want to restrict access to certain columns only you can use column level security and grant access only to those columns. Considering you have a group called ODBCAPPS it would looks something like this:

GRANT SELECT ON dbo.Employee (EmployeeID, FirstName, MiddleName, SurName) TO ODBCAPPS;

More details about GRANT you can find on MSDN

Upvotes: 1

Prathik
Prathik

Reputation: 474

You can do something with ASCII

UPDATE Table_name
SET x=ASCII(x)+3, y=ASCII(Y)+3 // Choose your number. This is the simplest

For more refer :https://learn.microsoft.com/en-us/sql/t-sql/functions/ascii-transact-sql

Upvotes: 0

Related Questions