0
我無法創建視圖 - 我的權限不足。 工作流 - >創建角色 - >授予創建視圖角色 - >創建用戶 - >添加角色到用戶 - >嘗試創建視圖,我得到的錯誤。任何幫助將不勝感激無法創建視圖 - 權限不足
創建一個角色
CREATE ROLE enrolment;
授予以下權限的角色 - 基表hr.students
GRANT insert, select, update
ON hr.students
TO enrolment;
還授予創建視圖權限的角色
GRANT create view
TO enrolment;
創建了以下用戶
CREATE USER enrol1
IDENTIFIED BY pw4321;
授予的角色帳戶
GRANT enrolment
TO enrol1;
當我嘗試創建基表hr.students下面的觀點,我被告知,我有足夠的權限。我可以在基表上運行select語句。
CREATE OR REPLACE VIEW vu_student_name
AS SELECT student_id, lastname
FROM hr.students;
謝謝Alex,這就解決了我的問題 –