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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Different SELECT result when run from SQLPLUS and asSP

Re: Different SELECT result when run from SQLPLUS and asSP

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Tue, 7 Dec 1999 16:39:30 +0100
Message-ID: <82j9ia$tqap$1@oceanite.cybercable.fr>


If you think that roles are not enable while executing a procedure then the answer is clear:
first result gives the number of table columns accessible when your roles are enable and second one only the columns you have a direct access without the privileges of your role.

--
Have a nice day
Michel

<todecker_at_my-deja.com> a écrit dans le message : 82iprr$1qr$1_at_nnrp1.deja.com...
> Does anybody have an explanation for these results?
>
> SQL> select count(*)
> 2 from sys.all_tab_columns;
>
> COUNT(*)
> ---------
> 25968
>
> SQL> CREATE OR REPLACE PACKAGE test AS
> 2 PROCEDURE the_output;
> 3 END test;
> 4 /
>
> Package created.
>
> SQL> CREATE OR REPLACE PACKAGE BODY test AS
> 2
> 3 PROCEDURE the_output IS
> 4 x NUMBER(10);
> 5 BEGIN
> 6 select count(*)
> 7 INTO x
> 8 from sys.all_tab_columns;
> 9 dbms_output.put_line('x: '||x);
> 10 END;
> 11 END test;
> 12 /
>
> Package body created.
>
> SQL> set serveroutput on
> SQL> execute test.the_output;
> x: 5069
>
> PL/SQL procedure successfully completed.
>
> I tried it under oracle 8.0.5 and 8.1.5 and get the same results.
> It somehow seems to be related to the users rights because I have a 3rd
> installation where it works fine.
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Dec 07 1999 - 09:39:30 CST

Original text of this message

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