![](/img/trans.png)
[英]SHOW GRANTS TO user ''usename" with filter on role (SNOWFLAKE)
[英]Creating a trigger that grants a role to every new created user
我在創建每次創建新用戶時授予角色的觸發器時遇到問題,我該怎么做?
CREATE TRIGGER grant_role_to_user
AFTER insert ON "here I need the right table"
FOR EACH ROW
BEGIN
GRANT role_1 to : NEW.USERNAME
END;
/
我嘗試了表 all_users、dba_users; 但它給了我一個錯誤“無法在此視圖上創建觸發器”
使用 oracle 10g
將GRANT ROLE
包含到用於創建新用戶的腳本中,即
create user mike identified by lion;
grant role_1 to mike;
我認為你不需要trigger
它。
只需將此role
分配給public
,每個用戶都會分配此角色。(包括將來創建的用戶)。 但要注意你在做什么。 你是認真的。
grant role_1 to public;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.