posts - 22,comments - 35,trackbacks - 0

          查看本用戶下的各種對(duì)象的SQL腳本

          SQL語(yǔ)句:
          表:
            select * from cat;
            select * from tab;
            select table_name from user_tables;
          視圖:
            select text from user_views where view_name=upper('&view_name');
          索引:
            select index_name,table_owner,table_name,tablespace_name,status from user_indexes order by table_name;
          觸發(fā)器:
            select trigger_name,trigger_type,table_owner,table_name,status from user_triggers;
          快照:
            select owner,name,master,table_name,last_refresh,next from user_snapshots order by owner,next;
          同義詞:
            select * from syn;
          序列:
            select * from seq;
          數(shù)據(jù)庫(kù)鏈路:
            select * from user_db_links;
          約束限制:
            select TABLE_NAME,CONSTRAINT_NAME,SEARCH_CONDITION,STATUS from user_constraints;
          本用戶讀取其他用戶對(duì)象的權(quán)限:
            select * from user_tab_privs;
          本用戶所擁有的系統(tǒng)權(quán)限:
            select * from user_sys_privs;
          用戶:
            select * from all_users order by user_id;
          表空間剩余自由空間情況:
            select tablespace_name,sum(bytes) 總字節(jié)數(shù),max(bytes),count(*) from dba_free_space group by tablespace_name;
          數(shù)據(jù)字典:
            select table_name from dict order by table_name;
          鎖及資源信息:
            select * from v$lock;不包括DDL鎖
          數(shù)據(jù)庫(kù)字符集:
            select name,value$ from props$ where name='NLS_CHARACTERSET';
          inin.ora參數(shù):
            select name,value from v$parameter order by name;
          SQL共享池:
            select sql_text from v$sqlarea;
          數(shù)據(jù)庫(kù):
            select * from v$database
          控制文件:
            select * from V$controlfile;
          重做日志文件信息:
            select * from V$logfile;
          來(lái)自控制文件中的日志文件信息:
            select * from V$log;
          來(lái)自控制文件中的數(shù)據(jù)文件信息:
            select * from V$datafile;
          NLS參數(shù)當(dāng)前值:
            select * from V$nls_parameters;
          ORACLE版本信息:
            select * from v$version;
          描述后臺(tái)進(jìn)程:
            select * from v$bgprocess;
          查看版本信息:
            select * from product_component_version;
           

          posted on 2006-03-16 16:30 kelven 閱讀(208) 評(píng)論(0)  編輯  收藏 所屬分類: DataBase
          主站蜘蛛池模板: 洮南市| 黑河市| 德昌县| 河北区| 襄汾县| 葫芦岛市| 广安市| 城市| 杭锦后旗| 革吉县| 余姚市| 南岸区| 叶城县| 昌黎县| 江西省| 玉环县| 大连市| 祁门县| 中山市| 邵阳市| 孟津县| 固镇县| 朝阳县| 太白县| 田林县| 浦东新区| 黎城县| 美姑县| 明光市| 太白县| 宁津县| 卢龙县| 云浮市| 忻州市| 南澳县| 拉孜县| 左权县| 开化县| 双牌县| 平昌县| 金塔县|