Hello,
i want to create the following view:
CREATE OR REPLACE FORCE VIEW
"REEWCORE"."CVF_ATEST" ("STAND_DATUM", "BRNRN_TXT", "BRNRN_SK") AS
select
t1.STAND_DATUM, t2.BRNRN_TXT, T2.BRNRN_SK
from
REEWCORE.CTF_REEW_MORE_201301 T1
LEFT JOIN
DIMCORE.CT_GD_BRNRN T2 ON T1.BRNRN_SK = T2.BRNRN_SK
LEFT JOIN
REEWCORE.CT_SD_REEW_KTAT T3 ON T1.KTAT_SK = T3.KTAT_SK
GROUP BY
t2.BRNRN_TXT, T2.BRNRN_SK, t1.STAND_DATUM
ORDER BY
T2.BRNRN_SK;
But i get the following error:
SQL-Fehler: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to perform a database operation without
the necessary privileges.
*Action: Ask your database administrator or designated security
administrator to grant you the necessary privileges
When i only submit the select-statement - it works:
select
t1.STAND_DATUM, t2.BRNRN_TXT, T2.BRNRN_SK
from
REEWCORE.CTF_REEW_MORE_201301 T1
LEFT JOIN
DIMCORE.CT_GD_BRNRN T2 ON T1.BRNRN_SK = T2.BRNRN_SK
LEFT JOIN
REEWCORE.CT_SD_REEW_KTAT T3 ON T1.KTAT_SK = T3.KTAT_SK
GROUP BY
t2.BRNRN_TXT, T2.BRNRN_SK, t1.STAND_DATUM
ORDER BY
T2.BRNRN_SK;
All users are in the same role - and the role has the privileges to select the tables:
When i set select-permission on DIMCORE.CT_GD_BRNRN to the user REEWCORE --> the CREATE VIEW-Statement works!
Is it possible, that a "CREATE VIEW" ignores permissions given by roles? Whats the reason? Is there a better way than set explicit select-permission on database-objects which i need in CREATE VIEW-Statements?
Thank you very much
Regards
Tom