posts - 2, comments - 27, trackbacks - 0, articles - 60
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          Oracle10g數據庫導入導出(跨字符集)

          Posted on 2010-07-25 11:53 ZhouFeng 閱讀(3187) 評論(0)  編輯  收藏 所屬分類: 轉載DataBase
          一導出:
          #!/bin/bash
          su - oracle -c "exp system/fakepass tables=$1 file=/data/$1.dmp"

          [root@web oracle8i]# dmp album

          Export: Release 10.1.0.3.0 - Production on 星期一 2月 5 01:56:55 2007

          Copyright (c) 1982, 2004, Oracle.  All rights reserved.


          連接到: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
          With the Partitioning, OLAP and Data Mining options
          已導出 ZHS16CGB231280 字符集和 AL16UTF16 NCHAR 字符集
          服務器使用 ZHS16GBK 字符集 (可能的字符集轉換)

          即將導出指定的表通過常規路徑...
          . . 正在導出表                           ALBUM導出了         590 行
          EXP-00091: 正在導出有問題的統計信息。
          EXP-00091: 正在導出有問題的統計信息。
          EXP-00091: 正在導出有問題的統計信息。
          導出成功終止, 但出現警告。
          二導入
          從 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
          With the Partitioning, OLAP and Data Mining options 斷開
          [oracle@dev ~]$ imp system/fit2007 file=blogcat.dmp tables=blogcat

          Import: Release 10.2.0.1.0 - Production on 星期一 2月 5 01:44:39 2007

          Copyright (c) 1982, 2005, Oracle.  All rights reserved.


          連接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
          With the Partitioning, OLAP and Data Mining options

          經由常規路徑由 EXPORT:V10.01.00 創建的導出文件
          已經完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的導入
          導入服務器使用 AL32UTF8 字符集 (可能的字符集轉換)
          導出客戶機使用 ZHS16CGB231280 字符集 (可能的字符集轉換)
          . 正在將 SYSTEM 的對象導入到 SYSTEM
          . 正在將 SYSTEM 的對象導入到 SYSTEM
          . . 正在導入表                       "BLOGCAT"導入了        1938 行
          成功終止導入, 沒有出現警告。
          [oracle@dev ~]$ imp system/topsecret file=blogcat.dmp tables=blogcat
          三總結
             2個oracle10g服務器,導出的在北京, 版本10.1.0.3.0, 使用 ZHS16GBK 字符集。
            導入的在寶雞,臨時開發測試用,版本 10.2.0.1.0,AL32UTF8 字符集。
            主要問題是2個服務器字符集不同,解決的關鍵是:在導入前,設置導入機器的NLS_LANG 與導出機器的NLS_LANG相同,為Simplified Chinese_china.ZHS16GBK
            全部導出的dmp文件有1.8G,學校服務器帶寬有限,所以采用了導出常用數據表的最新數據方法。

          轉:http://www.zhuoda.org/hofman/78332.html
          主站蜘蛛池模板: 泸定县| 内黄县| 札达县| 南华县| 明星| 大城县| 志丹县| 仁寿县| 盐源县| 临澧县| 永康市| 辽阳市| 施秉县| 石狮市| 永德县| 罗源县| 曲靖市| 历史| 济源市| 大方县| 枣强县| 枞阳县| 格尔木市| 盐城市| 建始县| 汉阴县| 高密市| 马山县| 塔城市| 鄂托克旗| 泰安市| 雅安市| 佛冈县| 武宣县| 惠东县| 巨野县| 霍州市| 吴堡县| 湛江市| 平遥县| 沙河市|