Hi Saminathan,

Add the line:

authid current_user

here:

procedure show_space
( p_segname in varchar2,
  p_owner   in varchar2 default user,
  p_type    in varchar2 default 'TABLE',
  p_partition in varchar2 default NULL )
authid current_user
as
    l_free_blks                 number;

and recreate the procedure as system and then it should run as your
other user. for example:

SQL> connect system/manager
Connected.
SQL> -- add the line authid current_user to show_space.sql
SQL> @show_space

Procedure created.

SQL> grant execute on show_space to public;

Grant succeeded.

SQL> create public synonym show_space for show_space;

Synonym created.

SQL> connect pete/pete
Connected.
SQL> create cluster phash (hash_key number) hashkeys 1000 size 8192;

Cluster created.

SQL> set serveroutput on size 1000000
SQL> exec show_space('PHASH',user,'CLUSTER');
Free Blocks.............................0
Total Blocks............................1456
Total Bytes.............................11927552
Unused Blocks...........................446
Unused Bytes............................3653632
Last Used Ext FileId....................1
Last Used Ext BlockId...................35049
Last Used Block.........................34

PL/SQL procedure successfully completed.

SQL>

hope this helps

kind regards

pete

-- 
Pete Finnigan
email:[EMAIL PROTECTED]
Web site: http://www.petefinnigan.com - Oracle security audit specialists
Book:Oracle security step-by-step Guide - see http://store.sans.org for details.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Pete Finnigan
  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).

Reply via email to