从oracle11导出dmp文件,然后向oracle9i中导数据的时候,出现很多错误,总结一下:
问题一:
解决办法:
在11g数据库中以sys身份登陆,修改一下exu9defpswitches脚本,即:
CREATE OR REPLACE VIEW exu9defpswitches (
compflgs, nlslensem ) AS
SELECT a.value, b.value
FROM sys.v$parameter a, sys.v$parameter b
WHERE a.name = 'plsql_code_type' AND
b.name = 'nls_length_semantics';
这时用9.2.0.8的客户端的exp就可以从11g中导出数据了.
问题二:
EXP-00008: Oracle error # encountered
ORA-01455: converting column overflows integer datatype
解决办法:
exp命令加上参数:INDEXES=n STATISTICS=none
本文链接
从11g开始,oracle支持跨平台传输表空间。
查看支持平台列表,如果源库和目标库的endian format不一致,需要convert
SQL> col platform_name for a32;
SQL> select * from v$transportable_platform;
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
----------- -------------------------------- ----------------------------
1 Solaris[tm] OE (32-bit) Big
2 Solaris[tm] OE (64-bit) Big
7 Microsoft Windows IA (32-bit) Little
10 Linux IA (32-bit) Little
6 AIX-Based Systems (64-bit) Big
3 HP-UX (64-bit) Big
5 HP Tru64 UNIX Little
4 HP-UX IA (64-bit) Big
11 Linux IA (64-bit) Little
15 HP Open VMS Little
8 Microsoft Windows IA (64-bit) Little
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
----------- -------------------------------- ----------------------------
9 IBM zSeries Based Linux Big
13 Linux x86 64-bit Little
16 Apple Mac OS Big
12 Microsoft Windows x86 64-bit Little
17 Solaris Operating System (x86) Little
18 IBM Power Based Linux Big
19 HP IA Open VMS Little
20 Solaris Operating System (x86-64 Little
)
21 Apple Mac OS (x86-64) Little
20 rows selected.
使用传输表空间的限制:
1.源库和目标库必须是同样的字符集和国家字符集
SQL> col parameter for a32;
SQL> col value for a30;
SQL> select * from nls_database_parameters;
PARAMETER VALUE
-------------------------------- ------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.2.0.3.0
...... ......
2.所有要传输的表空间对象必须是self-contained.意为:A表空间里的对象有引用B表空间的对象,那么表空间A和B都必须包含在transpotable set里。
不过不用担心,有DBMS_TTS包帮我们检查
下面开始实验吧:
source : windows oracle 11203 64bit
target : OEL 6.3 oracle 11203 64bit
platform,endian检查:
source:
SQL> SELECT d.PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d WHERE tp.PLATFORM_NAME = d.PLATFORM_NAME;
PLATFORM_NAME ENDIAN_FORMAT
-------------------------------- ---------------------------
Microsoft Windows x86 64-bit Little
target:
SQL> col platform_name for a30;
SQL> SELECT d.PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d WHERE tp.PLATFORM_NAME = d.PLATFORM_NAME;
PLATFORM_NAME ENDIAN_FORMAT
------------------------------ ----------
从11g开始,oracle支持跨平台传输表空间。
查看支持平台列表,如果源库和目标库的endian format不一致,需要convert
SQL> col platform_name for a32;
SQL> select * from v$transportable_platform;
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
----------- -------------------------------- ----------------------------
1 Solaris[tm] OE (32-bit) Big
2 Solaris[tm] OE (64-bit) Big
7 Microsoft Windows IA (32-bit) Little
10 Linux IA (32-bit) Little
6 AIX-Based Systems (64-bit) Big
3 HP-UX (64-bit) Big
5 HP Tru64 UNIX Little
4 HP-UX IA (64-bit) Big
11 Linux IA (64-bit) Little
15 HP Open VMS Little
8 Microsoft Windows IA (64-bit) Little
PLATFORM_ID PLATFORM_NAME ENDIAN_FORMAT
----------- -------------------------------- ----------------------------
9 IBM zSeries Based Linux Big
13 Linux x86 64-bit Little
16 Apple Mac OS Big
12 Microsoft Windows x86 64-bit Little
17 Solaris Operating System (x86) Little
18 IBM Power Based Linux Big
19 HP IA Open VMS Little
20 Solaris Operating System (x86-64 Little
)
21 Apple Mac OS (x86-64) Little
20 rows selected.
使用传输表空间的限制:
1.源库和目标库必须是同样的字符集和国家字符集
SQL> col parameter for a32;
SQL> col value for a30;
SQL> select * from nls_database_parameters;
PARAMETER VALUE
-------------------------------- ------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.2.0.3.0
...... ......
2.所有要传输的表空间对象必须是self-contained.意为:A表空间里的对象有引用B表空间的对象,那么表空间A和B都必须包含在transpotable set里。
不过不用担心,有DBMS_TTS包帮我们检查
下面开始实验吧:
source : windows oracle 11203 64bit
target : OEL 6.3 oracle 11203 64bit
platform,endian检查:
source:
SQL> SELECT d.PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d WHERE tp.PLATFORM_NAME = d.PLATFORM_NAME;
PLATFORM_NAME ENDIAN_FORMAT
-------------------------------- ---------------------------
Microsoft Windows x86 64-bit Little
target:
SQL> col platform_name for a30;
SQL> SELECT d.PLATFORM_NAME, ENDIAN_FORMAT FROM V$TRANSPORTABLE_PLATFORM tp, V$DATABASE d WHERE tp.PLATFORM_NAME = d.PLATFORM_NAME;
PLATFORM_NAME ENDIAN_FORMAT
------------------------------ ----------