I am trying to apply data masking policy on shared database where we have access to only views.However I provided grant to databases also.I am not able to apply this masking policy
here is my code
create or replace masking policy Policy_name as (val string) returns string ->
case
when current_role() in ('SECURITYADMIN') then val
else '*********'
end;
alter table if exists TABLE_NAME modify column PHN_NUMBER set MASKING POLICY Policy_name PHN_NUMBER;
error:
SQL execution error: Creating masking_policy on shared database 'DATABASE_NAME' is not allowed.