Good-day
I'm using the following procedure, to determine total blocks and unused blocks within a schema.
Currently I am inserting one table at a time,
HOW CAN I SELECT ALL TABLES WITHIN THE SCHEMA, is there a way of doing it,
ANY help will be much appreciated
/
I'm using the following procedure, to determine total blocks and unused blocks within a schema.
Currently I am inserting one table at a time,
HOW CAN I SELECT ALL TABLES WITHIN THE SCHEMA, is there a way of doing it,
ANY help will be much appreciated
Code:
et serveroutput on
set verify off
DECLARE
v_total_blocks number;
v_total_bytes number;
v_unused_blocks number;
v_unused_bytes number;
v_last_used_extent_file_id number;
v_last_used_extent_block_id number;
v_last_used_block number;
BEGIN
dbms_space.unused_space(segment_owner => UPPER('&OWNER'),
segment_name => UPPER('&NAME'),
segment_type => UPPER('&TYPE'),
total_blocks => v_total_blocks,
total_bytes => v_total_bytes,
unused_blocks => v_unused_blocks,
unused_bytes => v_unused_bytes,
last_used_extent_file_id => v_last_used_extent_file_id,
last_used_extent_block_id => v_last_used_extent_block_id,
last_used_block => v_last_used_block);
dbms_output.put_line('v_total_blocks :' || v_total_blocks);
dbms_output.put_line('v_unused_blocks :' || v_unused_blocks);
END;