J2EE社區

          茍有恒,何必三更起五更眠;
          最無益,只怕一日曝十日寒.
          posts - 241, comments - 318, trackbacks - 0, articles - 16
          1、查看所有用戶
          select * from dba_users;//dba
          select * from all_users;//all
          select * from user_users;//當前
          2、查看當前用戶連接:
          select * from v$Session;
          3、查看當前用戶權限:
          select * from session_privs;
          4、查看所有用戶系統權限
          select * from dba_sys_privs;
          select * from user_sys_privs;
          5、查看所有用戶對象權限
          select * from dab_tab_privs;
          select * from all_tab_privs;
          select * from user_tab_privs;
          6、查看所有角色
          select * from dba_roles;
          select * from dba_role_privs;
          select * from user_role_privs;
          7、查看所有表空間、臨時表空間等信息
          select tablespace_name,file_name,bytes file_size,autoextensible from dba_data_files;
          select tablespace_name,file_name,bytes file_size,autoextensible from dba_temp_files;
          8、查看用戶表空間使用情況:
          select 
            a.file_id "FileNo",a.tablespace_name "Tablespace_name",
            a.bytes "Bytes",a.bytes-sum(nvl(b.bytes,0)) "Used", sum(nvl(b.bytes,0)) "Free",sum(nvl(b.bytes,0))/a.bytes*100 "%free" 
          from dba_data_files a,dba_free_space b 
          where a.file_id=b.file_id(+
          group by a.tablespace_name , a.file_id,a.bytes 
          order by a.tablespace_name; 
          9、查看用戶所有對象
          select table_name,num_rows from user_tables;
          select * from all_tables;
          10、詢所有函數和存儲過程
          select * from dba_source;
          select * from user_source;



          名稱: ?4C.ESL | .↗Evon
          口號: 遇到新問題?先要尋找一個方案乄而不是創造一個方案こ
          mail: 聯系我


          主站蜘蛛池模板: 丰原市| 大悟县| 黄梅县| 乌苏市| 绥德县| 澄迈县| 阜阳市| 中宁县| 磐安县| 留坝县| 米泉市| 宿迁市| 肥西县| 张家界市| 革吉县| 尖扎县| 辽中县| 临西县| 锡林浩特市| 池州市| 夏邑县| 东海县| 磐石市| 盐池县| 扶绥县| 安乡县| 微山县| 敖汉旗| 甘孜县| 惠安县| 肥乡县| 眉山市| 新沂市| 仪陇县| 天镇县| 永顺县| 昭通市| 岳普湖县| 莆田市| 仪陇县| 通渭县|