DB2檢查數據庫權限
使用以下語法檢查在非限制性數據庫上授予PUBLIC
的數據庫權限:
第1步 ,首先啓動數據庫。
db2start
第2步 ,激活數據庫 「XYZ」。
db2 activate db XYZ
第3步 ,連接到 「XYZ」 數據庫。
db2 connect to XYZ
現在驗證數據庫的權限:
語法:
db2 "select substr(authority,1,25) as authority, d_user, d_group,
d_public, role_user, role_group, role_public,d_role from table(
sysproc.auth_list_authorities_for_authid ('public','g'))as t
order by authority"
示例:
db2 "select substr(authority,1,25) as authority, d_user, d_group, d_public, role_user, role_group, role_public,d_role from table(
sysproc.auth_list_authorities_for_authid ('public','g'))as t order by authority"
執行結果如下:
0 條評論,你可以發表評論,我們會進行改進
