[ORACLE] 통계정보 조회
/* 테이블 */ SELECT TABLE_NAME, NUM_ROWS, CHAIN_CNT, BLOCKS, EMPTY_BLOCKS, AVG_SPACE, AVG_ROW_LEN FROM ALL_TABLES A WHERE OWNER = 'XXX' ; /* 인덱스 */ SELECT TABLE_NAME, INDEX_NAME, STATUS, NUM_ROWS, LEAF_BLOCKS, BLEVEL FROM ALL_INDEXES WHERE OWNER = 'XXX' ;
[ORACLE] 스키마 이행 검증
WITH ORA_TABLE AS ( SELECT D.TABLE_TYPE , A.TABLE_NAME AS TBLID , D.COMMENTS AS TBLNM , CASE WHEN E.PARTITIONED = 'YES' THEN 'Y' END AS PARTITIONED , E.STATUS AS STATUS , A.COLUMN_ID AS COLNO , A.COLUMN_NAME AS COLID , TRIM(B.COMMENTS) AS COLNM , C.COLUMN_POSITION AS PK , REPLACE(A.DATA_TYPE,'TIMESTAMP(6)','TIMESTAMP') AS "TYPE" , DECODE(A.DATA_TYPE , ..
테이블 이관 후 건수 및 값 검증
--ORACLE SELECT 'TEST_TABLE' AS TBLID , COUNT(*) AS CNT , 0 + NVL(SUM(LENGTH(TRIM(COL_CHR))),0) + NVL(ROUND(SUM(COL_NUM)),0) + NVL(ROUND(SUM(TO_DATE(TO_CHAR(COL_DAT,'YYYYMMDD'),'YYYYMMDD') - TO_DATE('20000101','YYYYMMDD'))),0) + NVL(SUM(LENGTH(CAST(DBMS_LOB.SUBSTR(COL_CLOB,2000,1) AS NVARCHAR2(2000)))),0) AS CHK_SUM FROM TEST_TABLE ; * 오라클내에서 cha..