Created
June 24, 2019 09:36
-
-
Save forstie/b8105c4b1bce271c1a9abde39141b6b6 to your computer and use it in GitHub Desktop.
Row permissions control for ZDA access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- description: This row permission can be used to disallow specific jobnames from selecting | |
-- data over a specific file | |
-- | |
cl:CHGFCNUSG FCNID(QIBM_DB_SECADM) USER(SCOTTF) USAGE(*ALLOWED); -- repeat this on the target (not yet mirrored) | |
set schema star1g ; | |
set path star1g ; | |
create table RowPermRules ( | |
jobname varchar(10), | |
fetch_not_permitted integer | |
); | |
insert into RowPermRules | |
values('QZDASOINIT', 1), ('QZDASSINIT', 1); | |
create or replace permission SlowDownOdbc on Item_Fact | |
for rows where 0 = (select count(*) from RowPermRules | |
where jobname = right(qsys2.job_name,10) | |
and fetch_not_permitted = 1) | |
enforced for all access | |
enable; | |
alter table Item_Fact activate row access control; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment