oracle表空间传输 _MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 1747 | 回复: 0   主题: oracle表空间传输         下一篇 
ab19890824
注册用户
等级:少尉
经验:351
发帖:92
精华:0
注册:2011-11-21
状态:离线
发送短消息息给ab19890824 加好友    发送短消息息给ab19890824 发消息
发表于: IP:您无权察看 2015-7-1 15:35:29 | [全部帖] [楼主帖] 楼主

oracle表空间的传输步骤如下:

1.检验表空间的自包含性:

SQL>exec dbms_tts.transport_set_check('account_data',true);

SQL>select * from transport_set_violations;

--如果未选定行,说明表空间是自包含的。否则不能传输。

 

2.将表空间置为只读:

SQL>alter tablespace  tablespace_name read only;

 

3.卸出表空间:

$exp transport_tablespace=y tablespaces= tablespace_name file=xxx

 

4.复制数据文件和卸出文件,并将这些文件复制到另一台服务器。

 

5.使用IMP装入表空间:

$imp transport_tablespace=y datafiles='xxx.dbf' tablespaces=tablespace_name file=xxx.dmp

 

6.将表空间改为读写状态:

SQL>alter tablespace  tablespace_name read write;

 

表空间传输的一些限制:需要两个平台一致,必须有相同的字符集和多语言字符集。要求两个实例的db block size 大小相等,如不相等则需要兼容9.0以上等。

我在windows平台和solaris平台传输表空间的时候就遇到了以上问题,摘录如下:

 

$ imp transport_tablespace=y datafiles='/oracle/product/10.2.0/db_1/oradata/ocp1

0g/INDX01.DBF' tablespaces=indx file=indx.DMP

Import: Release 10.2.0.2.0 - Production on Fri Nov 28 08:59:02 2008

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

Username: / as sysdba

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Produc

tion

With the Partitioning, OLAP and Data Mining options

Export file created by EXPORT:V09.02.00 via conventional path

About to import transportable tablespace(s) metadata...

import done in US7ASCII character set and AL16UTF16 NCHAR character set

import server uses AL32UTF8 character set (possible charset conversion)

export client uses ZHS16GBK character set (possible charset conversion)

. importing SYS's objects into SYS

. importing SYS's objects into SYS

IMP-00017: following statement failed with ORACLE error 29345:

"BEGIN   sys.dbms_plugts.beginImport ('9.2.0.1.0',852,'2000',NULL,'NULL',629"

"7,6301,1); END;"

IMP-00003: ORACLE error 29345 encountered

ORA-29345: cannot plug a tablespace into a database using an incompatible charac

ter set

ORA-06512: at "SYS.DBMS_PLUGTS", line 2386

ORA-06512: at "SYS.DBMS_PLUGTS", line 1946

ORA-06512: at line 1

IMP-00000: Import terminated unsuccessfully

$

--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论