Reputation: 5
ALTER TABLE tblExample
ALTER COLUMN xxx ADD MASKED WITH(FUNCTION='default()')
This makes masked for every user except admin.
GRANT/DENY UNMASK TO USERONE
I want to mask for only 1 user. I don't want to mask all users -> drop masks for all users except that specific one
Is there any way to make this happen?
Upvotes: 0
Views: 699
Reputation: 6788
Security wise this is not a good practice at all...however, if you want all current&future db users to be able to unmask and a single user not to, then you could grant unmask to public and deny it to the "pooruser" (deny supersedes grant)
grant unmask to public;
deny unmask to pooruser;
Upvotes: 2