Sie sind auf Seite 1von 2

SYS_LOB0000056261C00003$$ identify the lob object associated with the table First find the segment name of large

object using the below query SELECT owner, table_name, column_name,segment_name FROM dba_lobs WHERE table_name ='<TABLE_NAME>' Then find the size of the segment name in dba_segments select bytes from dba_segments where segment_name='<LOB_OBJECT_NAME>' Now find the actual size of large object using the following query select sum(dbms_lob.getlength (<<segment name>>)) from <table_name>; then if there is much difference then we can shrink the segment alter table table_name modify lob (column_name) (shrink space);

SQL> SELECT owner, table_name, column_name 2 FROM dba_lobs 3 WHERE segment_name = 'SYS_LOB0000056261C00003$$'; OWNER TABLE_NAME ------------------------------ -----------------------------COLUMN_NAME ---------------------------------------------------------------------------XDB XMLDATA XDB$ACL

variable id number; begin declare name varchar2(100); descr varchar2(500); obj_id number; begin name:='Manual_Employees'; descr:='Segment Advisor Example'; dbms_advisor.create_task ( advisor_name => 'Segment Advisor', task_id => :id, task_name => name, task_desc => descr); dbms_advisor.create_object ( task_name => name, object_type => 'TABLE', attr1 => 'HR',

attr2 attr3 attr4 attr5 object_id

=> => => => =>

'EMPLOYEES', NULL, NULL, NULL, obj_id);

dbms_advisor.set_task_parameter( task_name => name, parameter => 'recommend_all', value => 'TRUE'); dbms_advisor.execute_task(name); end; end; /

Das könnte Ihnen auch gefallen