Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: create view using DBMS.SQL

RE: create view using DBMS.SQL

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Thu, 02 Jan 2003 11:05:10 -0800
Message-ID: <F001.00525E10.20030102110510@fatcity.com>


When you are compiling procedures/packages/functions (any stored code), your roles are turned off for that duration. As you are doing dynamic SQL, Oracle has no way of resolving required privileges to CREATE VIEW until runtime. Thusly your procedure gets created, but the statement fails.

Log in as sys or system (or any other id with DBA role) or simply tell your friendly DBA that you need CREATE VIEW directly granted to your schemata. If you will be accessing tables from multiple schema, get CREATE ANY VIEW instead.

Raj



Rajendra Jamadagni MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.

QOTD: Any clod can have facts, but having an opinion is an art!

-----Original Message-----
Sent: Thursday, January 02, 2003 1:48 PM To: Multiple recipients of list ORACLE-L

I can create view in schema. I don't know why it is not allowed me to create view in DBMS_SQL within procedure. Do I need additional privilege. Please give me some hints. TIA Trung.

SQL> create or replace view mytest
  2 as
  3 select * from tbl_file_definitions;

View created.

SQL> select count(*) from mytest;

  COUNT(*)


       641

SQL>
>From: "Koivu, Lisa" <Lisa.Koivu_at_efairfield.com>
>Reply-To: ORACLE-L_at_fatcity.com
>To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
>Subject: RE: create view using DBMS.SQL
>Date: Thu, 02 Jan 2003 10:02:16 -0800
>
>Right. Forgot that...
>
>-----Original Message-----
>Sent: Thursday, January 02, 2003 12:19 PM
>To: Multiple recipients of list ORACLE-L
>
>
>ummm directly?
>
>Raj
>______________________________________________________
>
>Rajendra Jamadagni MIS, ESPN Inc.
>
>Rajendra dot Jamadagni at ESPN dot com
>
>Any opinion expressed here is personal and doesn't reflect that of ESPN
>Inc.
>
>
>QOTD: Any clod can have facts, but having an opinion is an art!
>
>-----Original Message-----
>Sent: Thursday, January 02, 2003 11:46 AM
>To: Multiple recipients of list ORACLE-L
>
>
>
>Is the create view privilege granted to the procedure owner?
>
>
>



MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Donate Clothes
  INET: truongbatgioi_at_hotmail.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: Rajendra.Jamadagni_at_espn.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

Received on Thu Jan 02 2003 - 13:05:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US