Title: RE: create view using DBMS.SQL

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-----
From: Donate Clothes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 02, 2003 1:48 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: create view using DBMS.SQL


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" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
>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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

********************************************************************This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*********************************************************************2


Reply via email to