I am trying to create a view in Oracle using Toad and getting error table or view doesn't exist.
But when I run the query on its own it executes successfully. What is the possible reason ?
CREATE OR REPLACE FORCE VIEW MGR.V_INDEX_PERFORMANCE
(
INDEX_ID ,
INDEX_NAME,
MTD,
YTD
)
BEQUEATH DEFINER
AS
SELECT "INDEX_ID" ,
"INDEX_NAME",
"MTD",
"YTD" from MIS_PERMAL.MV_INDEX_PERFORMANCE
where INDEX_ID in (1045, 2005) AND FIELD_CODE = 'TR' AND CCY_CODE IN ('D', 'USD') order by INDEX_ID, price_date desc;
It's permissions, or rather the way they are granted. The MGR user has a privilege to query the underlying table which comes from a role. Oracle does not allow us to build views or procedures using privileges from a role. This is just the way the security model works.
The solution is to ask the table owner MIS_PERMAL (or a power user such as a DBA) to grant the SELECT privilege on MV_INDEX_PERFORMAMCE directly to MGR.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.