oracle技術_使用exp/imp 匯入11g資料到9i
現在有個需求,需要exp/imp11g的庫到9i中,這個一般來說想到三種方法思路,一個個嘗試(其實從高版本服務端支援低版本的原則,可以大概的猜測出9i的處理該)
方法1:匯出都使用11g客戶端
--11g客戶端匯出
[@xifenfei ~]$ exp chf/xifenfei file=/tmp/t_xifenfei.dmp
>log=/tmp/t_xifenfei.log tables=chf.t_xifenfei
Export: Release 11.2.0.3.0 - Production on Fri May 18 18:15:18 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table T_XIFENFEI 2 rows exported
Export terminated successfully without warnings.
--11g客戶端匯入
[@xifenfei ~]$ imp chf/xifenfei@ora9i file=/tmp/t_xifenfei_11g.dmp
>log=/tmp/t_xifenfei.log tables=chf.t_xifenfei
Import: Release 11.2.0.3.0 - Production on Fri May 18 18:17:24 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
IMP-00058: ORACLE error 6550 encountered
ORA-06550: line 1, column 33:
PLS-00302: component 'SET_NO_OUTLINES' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
IMP-00000: Import terminated unsuccessfully
這個錯誤是版本不相容導致:PLS-00302: component ‘SET_NO_OUTLINES’ must be declared
方法2:11g客戶端匯出,9i客戶端匯入
--11g客戶端匯出
[oracle@xifenfei ~]$ exp chf/xifenfei file=/tmp/t_xifenfei.dmp
>log=/tmp/t_xifenfei.log tables=chf.t_xifenfei
Export: Release 11.2.0.3.0 - Production on Fri May 18 18:15:18 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table T_XIFENFEI 2 rows exported
Export terminated successfully without warnings.
--傳輸到9i
[oracle@xifenfei tmp]$ scp t_xifenfei.dmp 192.168.1.10:/tmp/
The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established.
RSA key fingerprint is 3d:0c:d1:4b:45:bd:a3:f5:25:eb:4d:52:d2:32:03:69.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts.
oracle@192.168.1.10's password:
t_xifenfei.dmp 100% 56KB 56.0KB/s 00:00
--9i客戶端匯入
[oracle@xifenfei ~]$ imp chf/xifenfei file=/tmp/t_xifenfei.dmp tables=t_xifenfei
Import: Release 9.2.0.4.0 - Production on Thu May 24 23:32:18 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
IMP-00010: not a valid export file, header failed verification
IMP-00000: Import terminated unsuccessfully
--版本不相容(高版本的dump檔案低版本不能識別)
方法3:9i客戶端匯出,9i客戶端匯入
--9i客戶端匯出
[oracle@xifenfei ~]$ exp chf/xifenfei@ora11g file=/tmp/t_xifenfei_11g.dmp
>log=/tmp/t_xifenfei.log tables=chf.t_xifenfei
Export: Release 9.2.0.4.0 - Production on Thu May 24 23:37:20 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table T_XIFENFEI 2 rows exported
Export terminated successfully without warnings.
--9i客戶端匯入
[oracle@xifenfei log]$ imp chf/xifenfei file=/tmp/t_xifenfei_11g.dmp log=/tmp/xifenfei.log full=y
Import: Release 9.2.0.4.0 - Production on Fri May 25 03:22:14 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character setSegmentation fault
--匯入資料遇到setSegmentation fault異常終止
setSegmentation fault異常終止
--修改exu9defpswitches檢視
[oracle@xifenfei ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri May 18 22:29:00 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> CREATE OR REPLACE VIEW exu9defpswitches (
2 compflgs, nlslensem ) AS
3 SELECT a.value, b.value
4 FROM sys.v$parameter a, sys.v$parameter b
5 WHERE a.name = 'plsql_code_type' AND
6 b.name = 'nls_length_semantics' ;
View created.
--9i匯出11g資料
[oracle@xifenfei tmp]$ exp chf/xifenfei@ora11g file=/tmp/t_xifenfei_11g.dmp
>log=/tmp/xifenfei.log tables=t_xifenfei
Export: Release 9.2.0.4.0 - Production on Fri May 25 04:08:32 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table T_XIFENFEI 2 rows exported
Export terminated successfully without warnings.
--9i匯入資料
[oracle@xifenfei tmp]$ imp chf/xifenfei file=/tmp/t_xifenfei_11g.dmp
>log=/tmp/xifenfei.log tables=t_xifenfei
Import: Release 9.2.0.4.0 - Production on Fri May 25 04:08:53 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing CHF's objects into CHF
. . importing table "T_XIFENFEI" 2 rows imported
Import terminated successfully without warnings.
--至此匯入成功,完成了11gr2資料匯入到9ir2中
透過一系列的實驗證明,需要把11g的資料匯入到9i中,需要使用9i的客戶端進行,其中exu9defpswitches檢視需要重建,否則會出現setSegmentation fault異常,導致匯入失敗.
,來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/76103/viewspace-2147826/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle資料匯出匯入(exp/imp)Oracle
- Oracle資料庫匯入匯出。imp匯入命令和exp匯出命令Oracle資料庫
- 【exp/imp不同版本】Oracle不同版本的exp/imp使用注意事項Oracle
- oracle exp和impOracle
- exp匯出遭遇IMP-00020
- exp&imp的使用方法
- 使用imp/exp遇到兩個問題
- 不同版本exp/imp使用注意事項
- exp和imp詳解
- SQLServer匯出匯入資料到MySQLServerMySql
- Oracle 11g impdp 先資料後索引匯入方法Oracle索引
- 使用Excel匯入資料到SAP Cloud for Customer系統ExcelCloud
- [20190520]exp imp on th fly.txt
- Oracle 11G 閃回技術 使用Oracle閃回事務查詢Oracle
- Python批量匯入Excel資料到MySQLPythonExcelMySql
- imp-匯入小寫字母的表
- 使用Oracle SQL Developer匯入Excel資料OracleSQLDeveloperExcel
- Oracle 資料匯入匯出Oracle
- Oracle資料匯入匯出Oracle
- 用exp、imp遷移包含物化檢視日誌的資料
- 利用Excel匯入資料到SAP C4CExcel
- Oracle使用資料泵expdp,impdp進行資料匯出匯入Oracle
- Oracle OCP(54):IMPOracle
- Oralce 入門教程:Oracle Database 9i 10g 11g程式設計藝術 深入資料庫體系結構 第2版OracleDatabase程式設計資料庫
- 使用Logstash工具匯入sqlserver資料到elasticSearch及elk分散式日誌中心SQLServerElasticsearch分散式
- Oracle 資料匯入ExcelOracleExcel
- EXP、IMP、SQLLOADER、EXPDP、IMPDP、DBMS_METADATA、SQLPLUS等方面SQL
- Oracle使用RMAN從Windows遷移資料到LinuxOracleWindowsLinux
- Oracle 9i 11g歷史庫升級遷移資料至19c CDBOracle
- spark sql與mysql 資料載入與匯出資料到mysqlSparkMySql
- Sqoop匯出ClickHouse資料到HiveOOPHive
- Access 匯入 oracle 資料庫Oracle資料庫
- Oracle資料泵匯出匯入(expdp/impdp)Oracle
- Oracle資料泵的匯入和匯出Oracle
- 【oracle 資料匯入匯出字元問題】Oracle字元
- Java 匯入資料到Excel並提供檔案下載介面JavaExcel
- 【故障處理】Linux下匯入匯出“IMP-00030: failed to create file ... for write”LinuxAI
- oracle 9i資料庫做spaOracle資料庫
- oracle 11g expdp匯出報ORA-24001Oracle