前臺使用者自定義效能檢視

abraham_dba_2013發表於2014-12-18
CREATE OR REPLACE VIEW USER_CONSTRAINTS AS
SELECT owner,
       constraint_name,
       constraint_type,
       table_name,
       search_condition,
       r_owner,
       r_constraint_name,
       delete_rule,
       status,
       deferrable,
       deferred,
       validated,
       generated,
       bad,
       rely,
       last_change,
       index_owner,
       index_name,
       invalid,
       view_related
  FROM all_constraints
 WHERE owner = 'TMS_TEST_DATA';



CREATE OR REPLACE VIEW USER_CONS_COLUMNS AS
SELECT owner, constraint_name, table_name, column_name, position
  FROM all_cons_columns
 WHERE owner = 'TMS_TEST_DATA';



create or replace view user_tab_columns as
select  "OWNER","TABLE_NAME","COLUMN_NAME","DATA_TYPE","DATA_TYPE_MOD","DATA_TYPE_OWNER","DATA_LENGTH","DATA_PRECISION","DATA_SCALE","NULLABLE","COLUMN_ID","DEFAULT_LENGTH","DATA_DEFAULT","NUM_DISTINCT","LOW_VALUE","HIGH_VALUE","DENSITY","NUM_NULLS","NUM_BUCKETS","LAST_ANALYZED","SAMPLE_SIZE","CHARACTER_SET_NAME","CHAR_COL_DECL_LENGTH","GLOBAL_STATS","USER_STATS","AVG_COL_LEN","CHAR_LENGTH","CHAR_USED","V80_FMT_IMAGE","DATA_UPGRADED","HISTOGRAM"
  from all_tab_columns
  where  1=1 and owner='TMS_TEST_DATA';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29439655/viewspace-1372410/,如需轉載,請註明出處,否則將追究法律責任。

相關文章