posts - 15,comments - 29,trackbacks - 0
          導出導入之前的準備 

           

          1.連接數據庫 conn system/password@//192.168.1.100:1521/dbcms

           

          2.創建用戶 create user newuser identified by password;


          3.授權 GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,DBA,CONNECT,RESOURCE,CREATE SESSION to newuser  


          導出命令,任選其一:
           

           1 將數據庫TEST完全導出,用戶名system 密碼manager 導出到D:\daochu.dmp中

             exp system/manager@TEST file=d:\daochu.dmp full=y

           2 將數據庫中system用戶與sys用戶的表導出

             exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)

           3 將數據庫中的表inner_notify、notify_staff_relat導出

              exp aichannel/aichannel@TESTDB2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat) 

           4 將數據庫中的表table1中的字段filed1以"00"打頭的數據導出

             exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"



          導入命令,任選其一:
           

          1 將D:\daochu.dmp 中的數據導入 TEST數據庫中。

             imp system/manager@TEST  file=d:\daochu.dmp

             imp aichannel/aichannel@HUST full=y  file=file= d:\data\newsmgnt.dmp ignore=y

             上面可能有點問題,因為有的表已經存在,然后它就報錯,對該表就不進行導入。

             在后面加上 ignore=y 就可以了。

           2 將d:\daochu.dmp中的表table1 導入

           imp system/manager@TEST  file=d:\daochu.dmp  tables=(table1)


           

          posted on 2008-11-18 14:30 流腥魚 閱讀(272) 評論(0)  編輯  收藏 所屬分類: 數據庫

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


          網站導航:
           
          主站蜘蛛池模板: 桂林市| 获嘉县| 新邵县| 香河县| 广平县| 红河县| 万荣县| 郎溪县| 大同市| 长沙市| 外汇| 卓尼县| 贡嘎县| 民乐县| 温宿县| 阳曲县| 宁强县| 原阳县| 永年县| 民乐县| 郸城县| 洪泽县| 绍兴县| 娱乐| 鱼台县| 永靖县| 临沂市| 宜都市| 基隆市| 韶关市| 区。| 新巴尔虎右旗| 隆子县| 马公市| 右玉县| 乳山市| 连江县| 荆州市| 舟山市| 洪泽县| 杭锦后旗|