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

Home -> Community -> Usenet -> c.d.o.server -> Re: Executing dbms_space

Re: Executing dbms_space

From: M. Bhatti <mohammed.bhatti_at_mci.com>
Date: Wed, 18 Nov 1998 17:53:07 GMT
Message-ID: <36530A4D.A5F7A0C8@mci.com>


Ian & Chris wrote:

> Like this........
>
> column segment_name format a20
> SQL> select segment_name,segment_type from user_segments;
>
> SEGMENT_NAME SEGMENT_TYPE
> -------------------- -----------------
> TABLE1 TABLE
> SWARE_TABLE TABLE
> TABLE2 TABLE
> PLAN_TABLE TABLE
> INDEX_TEST TABLE
> PK_SWARE_TABLE INDEX
> IDX_INDEX_TEST INDEX
> PK_INDEX_TEST INDEX
>
> 8 rows selected.
>
> SQL> execute dbms_space.unused_space('IAN', 'SWARE_TABLE',
> 'TABLE',:out1,:out2,:out3,:out4,:out5,:out6,:out7)
>
> PL/SQL procedure successfully completed.
>
> SQL> print out1
>
> OUT1
> ---------
> 4801
>
> SQL> print out2
>
> OUT2
> ---------
> 9832448
>
> SQL> print out3
>
> OUT3
> ---------
> 973
>
> SQL> print out4
>
> OUT4
> ---------
> 1992704
>
> SQL> print out5
>
> OUT5
> ---------
> 2
>
> SQL> print out6
>
> OUT6
> ---------
> 3455
>
> SQL> print out7
>
> OUT7
> ---------
> 625
>
> SQL>
>
> "M. Bhatti" wrote:
>
> > I'm trying to execute the dbms_space.unused_space procedure but keep
>
> > getting errors.
> >
> > This is how I'm executing the sp on a Sun Solaris 2.5.1 and Oracle
> > 7.3.2.3:
> >
> > SQL> execute dbms_space.unused_space('SCOTT', 'EMPLYOEE', 'TABLE');
> > begin dbms_space.unused_space('SCOTT', 'EMPLYOEE', 'TABLE'); end;
> >
> > *
> > ERROR at line 1:
> > ORA-06550: line 1, column 7:
> > PLS-00306: wrong number or types of arguments in call to
> 'UNUSED_SPACE'
> > ORA-06550: line 1, column 7:
> > PL/SQL: Statement ignored
> >
> > I've looked at the prototype for the sp and it asks for 3 IN params
> and
> > returns 7 OUT params. So I should only be supplying the 3 IN
> params,
> > right?
> >
> > The procedure is defined as follows:
> > procedure unused_space(segment_owner IN varchar2,
> > segment_name IN varchar2,
> > segment_type IN varchar2,
> > total_blocks OUT number,
> > total_bytes OUT number,
> > unused_blocks OUT number,
> > unused_bytes OUT number,
> > unused_blocks OUT number,
> > unused_bytes OUT number,
> > last_used_extent_file_id OUT number,
> > last_used_extent_block_id OUT number,
> > last_used_block OUT number
> > );
> >
> > Any ideas what I'm doing wrong?
> >
> > Thanks
> >
> > mkb
>
> --
> to return e-mail remove NOSPAM from address......

Ian & Chris,

Got it! It worked.

Thanks.

mkb Received on Wed Nov 18 1998 - 11:53:07 CST

Original text of this message

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