Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Executing dbms_space
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
SQL> print out3
OUT3
973
SQL> print out4
OUT4
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......
Received on Tue Nov 17 1998 - 16:08:04 CST