is there an option in SQL server, that the whole table data is encrypted and to view the original data I need two passwords, one for myself and the other for the client
/****** Script for SelectTopNRows command from SSMS ******/ SELECT * FROM [dbo].[] create schema Security CREATE FUNCTION Security.tvf_(@filtercolumn AS nvarchar(50)) RETURNS TABLE WITH SCHEMABINDING AS RETURN SELECT 1 AS tvf_securitypredicate_result WHERE @filtercolumn = USER_NAME(); GO CREATE SECURITY POLICY Filter ADD FILTER PREDICATE Security.tvf_Predicate(filtercolumn) ON dbo.[] WITH (STATE = ON); GRANT SELECT ON schema::dbo TO []; GRANT SELECT ON schema::dbo TO SalesRep1; CREATE LOGIN [] WITH PASSWORD=N'MX%e[bz4+Ld],r]X' ,DEFAULT_DATABASE=[IbAssetsAndReferencesDev] CREATE USER [] FOR LOGIN []
is there an option in SQL server, that the whole table data is encrypted and to view the original data I need two passwords, one for myself and the other for the client
can we call this table level security ?
This is so helpful, is there any way to have your script?
/****** Script for SelectTopNRows command from SSMS ******/
SELECT *
FROM [dbo].[]
create schema Security
CREATE FUNCTION Security.tvf_(@filtercolumn AS nvarchar(50))
RETURNS TABLE
WITH SCHEMABINDING
AS
RETURN SELECT 1 AS tvf_securitypredicate_result
WHERE @filtercolumn = USER_NAME();
GO
CREATE SECURITY POLICY Filter
ADD FILTER PREDICATE Security.tvf_Predicate(filtercolumn)
ON dbo.[]
WITH (STATE = ON);
GRANT SELECT ON schema::dbo TO [];
GRANT SELECT ON schema::dbo TO SalesRep1;
CREATE LOGIN [] WITH PASSWORD=N'MX%e[bz4+Ld],r]X' ,DEFAULT_DATABASE=[IbAssetsAndReferencesDev]
CREATE USER [] FOR LOGIN []
@@techsapphire Good question and good reply. Thanks