Posted on 2010-07-25 11:53
ZhouFeng 閱讀(3181)
評論(0) 編輯 收藏 所屬分類:
轉(zhuǎn)載 、
DataBase
一導(dǎo)出:
#!/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
已導(dǎo)出 ZHS16CGB231280 字符集和 AL16UTF16 NCHAR 字符集
服務(wù)器使用 ZHS16GBK 字符集 (可能的字符集轉(zhuǎn)換)
即將導(dǎo)出指定的表通過常規(guī)路徑...
. . 正在導(dǎo)出表 ALBUM導(dǎo)出了 590 行
EXP-00091: 正在導(dǎo)出有問題的統(tǒng)計(jì)信息。
EXP-00091: 正在導(dǎo)出有問題的統(tǒng)計(jì)信息。
EXP-00091: 正在導(dǎo)出有問題的統(tǒng)計(jì)信息。
導(dǎo)出成功終止, 但出現(xiàn)警告。
二導(dǎo)入
從 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
經(jīng)由常規(guī)路徑由 EXPORT:V10.01.00 創(chuàng)建的導(dǎo)出文件
已經(jīng)完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的導(dǎo)入
導(dǎo)入服務(wù)器使用 AL32UTF8 字符集 (可能的字符集轉(zhuǎn)換)
導(dǎo)出客戶機(jī)使用 ZHS16CGB231280 字符集 (可能的字符集轉(zhuǎn)換)
. 正在將 SYSTEM 的對象導(dǎo)入到 SYSTEM
. 正在將 SYSTEM 的對象導(dǎo)入到 SYSTEM
. . 正在導(dǎo)入表 "BLOGCAT"導(dǎo)入了 1938 行
成功終止導(dǎo)入, 沒有出現(xiàn)警告。
[oracle@dev ~]$ imp system/topsecret file=blogcat.dmp tables=blogcat
三總結(jié)
2個oracle10g服務(wù)器,導(dǎo)出的在北京, 版本10.1.0.3.0, 使用 ZHS16GBK 字符集。
導(dǎo)入的在寶雞,臨時開發(fā)測試用,版本 10.2.0.1.0,AL32UTF8 字符集。
主要問題是2個服務(wù)器字符集不同,解決的關(guān)鍵是:在導(dǎo)入前,設(shè)置導(dǎo)入機(jī)器的NLS_LANG 與導(dǎo)出機(jī)器的NLS_LANG相同,為Simplified Chinese_china.ZHS16GBK
全部導(dǎo)出的dmp文件有1.8G,學(xué)校服務(wù)器帶寬有限,所以采用了導(dǎo)出常用數(shù)據(jù)表的最新數(shù)據(jù)方法。
轉(zhuǎn):http://www.zhuoda.org/hofman/78332.html