Q & A

오렌지 작업시 생기는 쿼리 질문

Date2011.07.13 / Hit : 6110

안녕하세요.

오렌지에서 테이블과 인덱스정보를 확인 할때 쓰는 쿼리 같은데 오렌지에서 어떤작업을 하였을때 아래와 같은 쿼리가 생기는지 알수 있을까요?

2가지 쿼리를  알려드립니다.

1.

SELECT OWNER, TABLE_NAME TABLE_NAME, NULL PARTITION_NAME, 'TABLE' SEGMENT_TYPE, TABLESPACE_NAME, NULL LOBCOL_NAME, NULL LOBSEG_NAME, NULL LOBPART_NAME, NULL IOT_NAME
FROM DBA_TABLES
WHERE TABLESPACE_NAME = :B1
AND PARTITIONED = 'NO' AND
TEMPORARY = 'N' AND NESTED = 'NO'

UNION ALL

SELECT TABLE_OWNER, TABLE_NAME, NULL PARTITION_NAME, 'TABLE' SEGMENT_TYPE, TABLESPACE_NAME, NULL LOBCOL_NAME, NULL LOBSEG_NAME, NULL LOBPART_NAME, NULL IOT_NAME
FROM DBA_INDEXES
WHERE TABLESPACE_NAME = :B1
AND INDEX_TYPE = 'IOT - TOP'

UNION ALL

SELECT TABLE_OWNER OWNER, TABLE_NAME TABLE_NAME, PARTITION_NAME, 'TABLE PARTITION' SEGMENT_TYPE, TABLESPACE_NAME, NULL LOBCOL_NAME, NULL LOBSEG_NAME, NULL LOBPART_NAME, NULL IOT_NAME
FROM DBA_TAB_PARTITIONS
WHERE TABLESPACE_NAME = :B1
AND COMPOSITE = 'NO'

UNION ALL

SELECT TABLE_OWNER OWNER, TABLE_NAME TABLE_NAME, SUBPARTITION_NAME, 'TABLE SUBPARTITION' SEGMENT_TYPE, TABLESPACE_NAME, NULL LOBCOL_NAME, NULL LOBSEG_NAME, NULL LOBPART_NAME, NULL IOT_NAME
FROM DBA_TAB_SUBPARTITIONS
WHERE TABLESPACE_NAME = :B1

UNION ALL

SELECT OWNER, INDEX_NAME TABLE_NAME, NULL PARTITION_NAME, 'INDEX' SEGMENT_TYPE, TABLESPACE_NAME, NULL LOBCOL_NAME, NULL LOBSEG_NAME, NULL LOBPART_NAME, NULL IOT_NAME
FROM DBA_INDEXES
WHERE INDEX_TYPE IN ('NORMAL', 'BITMAP', 'SECONDARY', 'FUNCTION-BASED')
AND TABLESPACE_NAME = :B1
AND PARTITIONED = 'NO'

UNION ALL

SELECT INDEX_OWNER OWNER, INDEX_NAME TABLE_NAME, PARTITION_NAME, 'INDEX PARTITION' SEGMENT_TYPE, TABLESPACE_NAME, NULL LOBCOL_NAME, NULL LOBSEG_NAME, NULL LOBPART_NAME, NULL IOT_NAME
FROM DBA_IND_PARTITIONS
WHERE TABLESPACE_NAME = :B1
AND COMPOSITE = 'NO'

UNION ALL

SELECT OWNER OWNER, TABLE_NAME, NULL PARTITION_NAME, 'LOB' SEGMENT_TYPE, TABLESPACE_NAME, COLUMN_NAME LOBCOL_NAME, SEGMENT_NAME LOBSEG_NAME, NULL LOBPART_NAME, NULL IOT_NAME
FROM DBA_LOBS
WHERE TABLESPACE_NAME = :B1
AND PARTITIONED = 'NO'

UNION ALL

SELECT TABLE_OWNER OWNER, TABLE_NAME, PARTIT....

.....더 있는 것 같지만 trc 파일에 찍힌것은 여기까지 입니다.

 

2.

select a.index_name, ' ' partition_name, ' ' subpartition_name, to_number('0') partition_position, to_number('0') subpartition_position,
       partitioning_type, subpartitioning_type, c.high_value, a.def_tablespace_name tablespace_name, a.def_pct_free pct_free,
       a.def_ini_trans ini_trans, a.def_max_trans max_trans, decode(a.def_initial_extent,'DEFAULT', to_number(null),
       to_number(a.def_initial_extent)) initial_extent, decode(a.def_next_extent,'DEFAULT',to_number(null),
       to_number(a.def_next_extent)) next_extent, decode(a.def_min_extents,'DEFAULT',to_number(null),to_number(a.def_min_extents)) min_extents,
       decode(a.def_max_extents,'DEFAULT',to_number(null),to_number(a.def_max_extents)) max_extents,
       decode(a.def_pct_increase,'DEFAULT',to_number(null),to_number(a.def_pct_increase)) pct_increase,
       a.def_freelists freelists, a.def_freelist_groups freelist_groups, a.def_logging logging, ' ' compression, a.def_buffer_pool buffer_pool,
       ' ' tablespace_name, to_number(null) pct_free, to_number(null) ini_trans, to_number(null) max_trans, to_number(null) initial_extent,
       to_number(null) next_extent, to_number(null) min_extents, to_number(null) max_extents, to_number(nul

  • 대표전화
    1660-1675

  • 기술 문의
    02-6931-1734

  • 오렌지 문의
    070-8666-8175

  • 라이선스 문의
    02-6931-1728