隨筆 - 6  文章 - 0  trackbacks - 0
          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          導出表

          導出自己的表:
          exp  scott/tiger tables=(emp) file=d:\emp.dmp

          導出其它方案的表
          exp  system/system tables=(scott.emp) file=d:\emp2.dmp

          導出表結構
          exp  scott/tiger tables=(emp) file=d:\emp.dmp rows=n


          使用直接導出方式
          exp  scott/tiger tables=(emp) file=d:\emp.dmp direct=y

          導出多個方案
          exp  system/system owner=(system,scott) file=d:\system.dmp

          導出數據庫
          exp system/system full=y inctype=complete file=d:\x.dmp

          查詢顯示用戶所有的系統權限
          select * from dba_sys_privs;

          查詢顯示用戶具有的對象權限
          select * from dba_tab_privs;

          查詢顯示用戶具有的列權限
          select * from dba_col_privs;

          查詢顯示用戶所具有的角色
          select * from dba_role_privs;

          查詢oracle中所有的系統權限,一般是dba
          select * from system_privilege_map order by name;

          查詢oracle中所有的角色,一般是dba
          select * from dba_roles;

          查詢oracle中所有的對象權限,一般是dba
          select distinct privilege from dba_tab_privs;

          查詢數據庫的表空間
          select tablespace_name from dba_tablespaces;

          查看某個角色包括哪些系統權限
          select * from dba_sys_privs where grantee='角色名';
          或者select * from role_sys_privs where role='角色名';

          查看某個角色包括的對象權限
          select * from dba_tab_privs where grantee='角色名';

          查看某個用戶具有什么樣的角色
          select * from dba_role_privs where grantee='用戶名';

          顯示當前用戶可以訪問的所有數據字典視圖
          select * from dict where comments like '%grant%'

          顯示當前數據庫的全稱
          select * from global_name;

          EXP-00091 正在導出有問題的統計信息 問題的解決
          exp 命令后加上statistics=none

          建立表空間
          create tablespace 表空間名字 datafile 'd:\glorin.dbf' size 20m uniform size 128k

          使表空間脫機
          alter tablespace 表空間名 offline;

          使表空間聯機
          alter tablespace 表空間名 online;

          使表空間只讀
          alter tablespace 表空間名 read only;

          知道表空間名,查看該表空間名包括的所有表
          select * from all_tables where tablespace_name='表空間名';

          知道表名,查看該表屬于哪個表空間
          select tablespace_name,table_name from user_tables where table_name='emp';

          刪除表空間
          drop tablespace '表空間'including contents and datafiles;

          擴展表空間
          1)增加數據文件
          alter tablespace 表空間名 add datafile='d:\test\sp01.dbf' size 20m

          2)增減數據文件的大小
          alter database datafile 'd:\test\sp01.dbf' resize 20m;

          3)設置文件的自動增長
          alter database datafile 'd:\test\sp01.dbf' autoextend on next 10m maxsize 500m;

          posted on 2011-09-28 10:00 Glorin 閱讀(86) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 宁远县| 文水县| 宜川县| 敦化市| 太湖县| 锡林郭勒盟| 吴旗县| 长沙市| 崇礼县| 金川县| 杂多县| 满洲里市| 葫芦岛市| 临沂市| 泗水县| 延川县| 广西| 仁怀市| 大宁县| 青阳县| 辽宁省| 铁力市| 新和县| 祁阳县| 瑞金市| 台中县| 三原县| 兴国县| 称多县| 个旧市| 辽中县| 名山县| 吴忠市| 大石桥市| 灵台县| 万荣县| 邹平县| 大荔县| 元朗区| 五莲县| 台前县|