grant unmask to role

  • Hi All,

    i am using SQL Server Management Studio 2017. i have a database and i have masked a column. There are 500 users who are using the database. Upon request i need to provide unmask data to around 150 users.

    Would it be possible to create a database role and give the grant to the role ?

    Please provide the steps.

    Thanks in Advance,

    Regards,

    Sun

  • Hi Sun,

     

    This should do it for you.

    --Change to the right db

    USE [DBNAME]

    GO

    --Create a new role

    CREATE ROLE [UnMasker] AUTHORIZATION [dbo]

    GO

    --Add a new user to the role

    ALTER ROLE [UnMasker] ADD MEMBER [USEER]

    GO

    --Grant the unmask permission to the role

    GRANT UNMASK TO [UnMasker]

    Let me know how you get on.

    Thanks,

    Nic

  • Thanks Nic

    Its working.

  • Hi Nic,

    is there any permission like mask so that a role can be created for mask ?

    Thanks in Advance,

    Regards,

    Sun

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply