我為你狂
          為你而瘋狂
          posts - 29,comments - 9,trackbacks - 0

          下面的是導入導出的實例,向導入導出看實例基本上就可以完成,因為導入導出很簡單。

          數(shù)據(jù)導出:

          1 將數(shù)據(jù)庫TEST完全導出,用戶名system 密碼manager 導出到D:\daochu.dmp中
             exp system/manager@TEST file=d:\daochu.dmp full=y
          2 將數(shù)據(jù)庫中system用戶與sys用戶的表導出
             exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
          3 將數(shù)據(jù)庫中的表table1 、table2導出
             exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2)
          4 將數(shù)據(jù)庫中的表table1中的字段filed1以"00"打頭的數(shù)據(jù)導出
             exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 like '00%'\"
            
               上面是常用的導出,對于壓縮我不太在意,用winzip把dmp文件可以很好的壓縮。
                不過在上面命令后面 加上 compress=y  就可以了

          數(shù)據(jù)的導入:

          1 將D:\daochu.dmp 中的數(shù)據(jù)導入 TEST數(shù)據(jù)庫中。
             imp system/manager@TEST  file=d:\daochu.dmp
             上面可能有點問題,因為有的表已經(jīng)存在,然后它就報錯,對該表就不進行導入。
             在后面加上 ignore=y 就可以了。
          2 將d:\daochu.dmp中的表table1 導入
          imp system/manager@TEST  file=d:\daochu.dmp  tables=(table1)

          基本上上面的導入導出夠用了。
          posted on 2007-04-02 11:46 小虎(年輕) 閱讀(4507) 評論(2)  編輯  收藏 所屬分類: Oracle相關

          FeedBack:
          # re: 常用的Oracle表與數(shù)據(jù)的導入導出
          2007-07-06 18:03 | Foxer
          十分感謝,用的時候就是記得不太清楚  回復  更多評論
            
          # re: 常用的Oracle表與數(shù)據(jù)的導入導出
          2008-06-28 14:50 | d
          bu cuo  回復  更多評論
            
          主站蜘蛛池模板: 永丰县| 德化县| 正镶白旗| 民勤县| 扎囊县| 蓝田县| 平原县| 林西县| 纳雍县| 济阳县| 青河县| 龙海市| 建瓯市| 通城县| 盐边县| 嵩明县| 扎囊县| 昭平县| 武汉市| 攀枝花市| 新安县| 金华市| 孟连| 微山县| 阳高县| 武清区| 崇义县| 抚宁县| 东至县| 龙川县| 保德县| 大关县| 太白县| 汾阳市| 抚顺市| 鄂托克前旗| 玉田县| 乐东| 汉中市| 华宁县| 德庆县|