Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Different SELECT result when run from SQLPLUS and asSP
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
![]() |
![]() |