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: Using ALL_CONS_COLUMN view inside a function

RE: Using ALL_CONS_COLUMN view inside a function

From: Brett Hammerlindl <hammerl_at_telusplanet.net>
Date: Tue, 28 Aug 2007 08:45:21 -0600
Message-ID: <1188312321.46d43501b49c6@webmail.telusplanet.net>


Toon, this does explain the difference in the results. If I 'set roles none' before running my queries, I get result consistent with the function.

I am able to get the desired results using view ALL_CONS_COLUMNS provided that the current user has select privledges on the table that holds the constraint.

Thank you, one and all for the help.

Brett H.

Quoting "Koppelaars, Toon" <T.Koppelaars_at_centraal.boekhuis.nl>:

> Brett,
>
>
> >>The value returned inside a function is 27 while the query returns
> 703.
>
> Embedded SQL inside stored modules (functions, procedures, triggers or
> packages) will not use additional privileges that may have been acquired
> through database roles.
>
> Does your session have roles set, when you run the query (outside the
> function)?
>
> What happens if you do a 'set roles none', prior to running the query.
> Is then returning 27 (as is the query when run inside the function)?
>
> Toon
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Aug 28 2007 - 09:45:21 CDT

Original text of this message

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