set echo off
--
-- Name: space_object.sql
--
-- Description: Objects - Display used/unused space information for a specific object
--
-- Usage: @space_object owner object_name object_type
--
-- Example: @space_object SCHEMA1 TABLE1 TABLE
-- @space_object SYSADM PERSONAL_DATA TABLE
--
set verify off
VARIABLE total_blocks number;
VARIABLE total_bytes number;
VARIABLE unused_blocks number;
VARIABLE unused_bytes number;
VARIABLE last_used_extent_file_id number;
VARIABLE last_used_extent_block_id number;
VARIABLE last_used_block number;
begin
dbms_space.unused_space('&&1','&&2','&&3',
:total_blocks, :total_bytes, :unused_blocks, :unused_bytes,
:last_used_extent_file_id, :last_used_extent_block_id, :last_used_block);
end;
/
--
undefine 1
undefine 2
undefine 3
set verify on
set echo on
print total_blocks total_bytes unused_blocks unused_bytes last_used_extent_file_id last_used_extent_block_id last_used_block;
-- exit
|