############################## 錯誤現象:###############################
用9i的exp匯出時錯誤如下:
F:\Oracle\bin>exp wssw/foresee@cradle203 file=d:\sb_sbxx_zb.dmp tables=sb_sbxx_zb
Export: Release 9.2.0.1.0 - Production on 星期五 5月 27 11:15:24 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
串連到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
已匯出 ZHS16GBK 字元集和 AL16UTF16 NCHAR 字元集
即將匯出指定的表通過常規路徑 ...
. . 正在匯出表 SB_SBXX_ZB
EXP-00003: 未找到段 (6,2315) 的儲存定義
匯出成功終止,但出現警告。
#########################################################################
查看metalink,發現只要是9.2.0.5以前的exp去匯出9.2.0.5以後資料庫中含有LOB欄位的表,都會出現這個錯誤。
解決辦法:
1、升級client端到9.2.0.5以上。
我使用9208/10.1.0.4的exp匯出一個含有BLOB和CLOB的表,能匯出所有資料!
2、替代解決辦法:
在匯出前, 串連到SYS使用者, 運行以下SQL:
CREATE OR REPLACE VIEW exu9tne (
tsno, fileno, blockno, length) AS
SELECT ts#, segfile#, segblock#, length
FROM sys.uet$
WHERE ext# = 1
UNION ALL
SELECT * FROM SYS.EXU9TNEB
匯出完成後,再複原這個view(定義可以通過user_views看到) 對於oracle9i和oracle10g這個定義都相同:
CREATE OR REPLACE VIEW exu9tne (
tsno, fileno, blockno, length) AS
SELECT ts#, segfile#, segblock#, length
FROM sys.uet$
WHERE ext# = 1
在9i中匯入時正常匯入即可,不會有任何錯誤。