programmera.net -> oracledba -> normal     för utskrift      info@programmera.net

DBA_SEGMENTS

1. DBA_SEGMENTS
2. Exempel 1: Kolla antal segment

1. DBA_SEGMENTS

DBA_SEGMENTS visar information om all segment i databasen, och vilka tabellutrymmen de tillhör:
SQL>  DESC dba_segments

 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 OWNER                                              VARCHAR2(30)
 SEGMENT_NAME                                       VARCHAR2(81)
 PARTITION_NAME                                     VARCHAR2(30)
 SEGMENT_TYPE                                       VARCHAR2(18)
 TABLESPACE_NAME                                    VARCHAR2(30)
 HEADER_FILE                                        NUMBER
 HEADER_BLOCK                                       NUMBER
 BYTES                                              NUMBER
 BLOCKS                                             NUMBER
 EXTENTS                                            NUMBER
 INITIAL_EXTENT                                     NUMBER
 NEXT_EXTENT                                        NUMBER
 MIN_EXTENTS                                        NUMBER
 MAX_EXTENTS                                        NUMBER
 PCT_INCREASE                                       NUMBER
 FREELISTS                                          NUMBER
 FREELIST_GROUPS                                    NUMBER
 RELATIVE_FNO                                       NUMBER
 BUFFER_POOL                                        VARCHAR2(7)

2. Exempel 1: Kolla antal segment

I tabellutrymmet DP_EVENTHISTORY_INDEX finns följande segement:
SQL>  select TABLESPACE_NAME , bytes, segment_name from dba_segments where tablespace_name = 'DP_EVENTHISTORY_INDEX';

TABLESPACE_NAME                     BYTES SEGMENT_NAME
------------------------------ ---------- ---------------------------------------------------------------------------------
DP_EVENTHISTORY_INDEX             4194304 IX_IE1_ELS_SFMEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE2_ELS_SFMEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE3_ELS_SFMEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE4_ELS_SFMEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_PK_ELS_SFMEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE5_ELS_SFMEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE1_ELS_TSEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE2_ELS_TSEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_PK_ELS_TSEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE5_ELS_TSEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE1_ELS_TPMEVENTHISTORY
DP_EVENTHISTORY_INDEX             4194304 IX_IE2_ELS_TPMEVENTHISTORY

12 rows selected.