隨筆 - 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)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 化州市| 黑河市| 社会| 郑州市| 日喀则市| 纳雍县| 广宗县| 柳州市| 伊春市| 株洲市| 格尔木市| 炉霍县| 泰来县| 新密市| 龙海市| 镇康县| 德清县| 封开县| 淮滨县| 封丘县| 武夷山市| 崇仁县| 辽阳市| 龙泉市| 迭部县| 富源县| 商水县| 论坛| 盐边县| 余庆县| 潢川县| 竹北市| 漯河市| 稷山县| 巨野县| 雷山县| 鸡泽县| 泰州市| 库尔勒市| 台州市| 宁南县|