select owner||'.'||table_name||' - '||ltrim(max(sys_connect_by_path(column_name,',')), ',') "Column"
from
(
    select owner,table_name, column_name, row_number() over(partition by owner,table_name order by column_id) rn
    from
    (
        select owner,table_name, column_name, column_id
        from dba_tab_columns
        where owner='DBSNMP'
        order by table_name, column_id
    )
)
start with rn = 1
connect by prior table_name=table_name
and prior rn = rn - 1
group by owner, table_name
order by table_name


Row#    Column
------- ---------------------------------------------
1 DBSNMP.MGMT_BASELINE - INSTANCE_NUMBER,CAPTURE_TIME,PREV_CAPTURE_TIME,DB_TIME,CPU_TIME,APPLICATION_WAIT_TIME,CLUSTER_WAIT_TIME,USER_IO_WAIT_TIME,CONCURRENCY_WAIT_TIME
2 DBSNMP.MGMT_BASELINE_SQL - INSTANCE_NUMBER,SQL_TEXT,SQL_ID,HASH_VALUE,EXECUTIONS,ELAPSED_TIME,T_PER_EXEC
3 DBSNMP.MGMT_BSLN_BASELINES - BSLN_GUID,TARGET_UID,NAME,TYPE,SUBINTERVAL_KEY,STATUS
4 DBSNMP.MGMT_BSLN_DATASOURCES - DATASOURCE_GUID,SOURCE_TYPE,TARGET_UID,METRIC_UID,TARGET_GUID,METRIC_GUID,KEY_VALUE,DBID,INSTANCE_NUM,INSTANCE_NAME,METRIC_ID
5 DBSNMP.MGMT_BSLN_INTERVALS - BSLN_GUID,INTERVAL_BEGIN,INTERVAL_END,INTERVAL_DAYS
6 DBSNMP.MGMT_BSLN_METRICS - METRIC_UID,TAIL_ESTIMATOR,THRESHOLD_METHOD_DEFAULT,NUM_OCCURRENCES_DEFAULT,WARNING_PARAM_DEFAULT,CRITICAL_PARAM_DEFAULT
7 DBSNMP.MGMT_BSLN_RAWDATA - DATASOURCE_GUID,OBS_TIME,OBS_VALUE
8 DBSNMP.MGMT_BSLN_STATISTICS - BSLN_GUID,DATASOURCE_GUID,COMPUTE_DATE,SUBINTERVAL_CODE,SAMPLE_COUNT,AVERAGE,MINIMUM,MAXIMUM,SDEV,PCTILE_25,PCTILE_50,PCTILE_75,PCTILE_90,PCTILE_95,EST_SAMPLE_COUNT,EST_SLOPE,EST_INTERCEPT,EST_FIT_QUALITY,EST_PCTILE_99,EST_PCTILE_999,EST_PCTILE_9999
9 DBSNMP.MGMT_BSLN_THRESHOLD_PARMS - BSLN_GUID,DATASOURCE_GUID,THRESHOLD_METHOD,NUM_OCCURRENCES,WARNING_PARAM,CRITICAL_PARAM,FAIL_ACTION
10 DBSNMP.MGMT_CAPTURE - INSTANCE_NUMBER,CAPTURE_ID,CAPTURE_TIME,DB_TIME,CPU_TIME,APPLICATION_WAIT_TIME,CLUSTER_WAIT_TIME,USER_IO_WAIT_TIME,CONCURRENCY_WAIT_TIME





 

+ Recent posts