brgdotnet
asked on
Creating view gives insufficient privileges error message.
I have the following code which I am using to create a view. When I run the code below, I get the error shown at the bottom of this post. Note that I am able to run this select statement (SELECT DB_LINK FROM DBA_DB_LINKS) directly from within sql developer, but when I added it to the view and try to create the view, then I get the below error message.g
Also I know I have sufficient priviledges to create a view, as I have done it before. However for some reason the query against DBA_DB_LINKS within the view seems to be the issue here?
CREATE OR REPLACE VIEW MY_VIEW
(
SERVER
)
AS
SELECT DB_LINK FROM DBA_DB_LINKS;
/
Error starting at line : 1 in command -
CREATE OR REPLACE VIEW MY_VIEW
(
SERVER
)
AS
SELECT DB_LINK FROM DBA_DB_LINKS;
/
Error report -
SQL Error: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to perform a database operation without the necessary priviledges.
*Action: Ask your database administrator or designated security administrator to grant you the necessary priviledges.
Also I know I have sufficient priviledges to create a view, as I have done it before. However for some reason the query against DBA_DB_LINKS within the view seems to be the issue here?
CREATE OR REPLACE VIEW MY_VIEW
(
SERVER
)
AS
SELECT DB_LINK FROM DBA_DB_LINKS;
/
Error starting at line : 1 in command -
CREATE OR REPLACE VIEW MY_VIEW
(
SERVER
)
AS
SELECT DB_LINK FROM DBA_DB_LINKS;
/
Error report -
SQL Error: ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to perform a database operation without the necessary priviledges.
*Action: Ask your database administrator or designated security administrator to grant you the necessary priviledges.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks HainKurt. I will try it out tomorrow.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT DB_LINK FROM DBA_DB_LINKS;
>>>
select 1 from any table
and see if it compiles...