免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3205 | 回复: 2
打印 上一主题 下一主题

我做了一个表空间的传输测试 .有三个步骤.能帮分析一下吗.感谢!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-23 13:44 |只看该作者 |倒序浏览
第一步:的基础是用spark用户建立二个表tt2,t4,表空间所有权是system,这时是可以导出的
第二步:用sys在这个表空间下增加一个表t5,这时不能导出.
第三步:还是第二步的环境,可以导出(非传输)表空间,但没显示t5:em11:


step1:导出将要传输的表空间.(这时可以导出)
SQL> select owner,table_name,tablespace_name from all_tables where tablespace_name='T2';

OWNER                          TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------ ------------------
SPARK                          TT2                            T2
SPARK                          T4                             T2

oracle@standby: /home/oracle> exp tablespaces=t2 transport_tablespace=y file=/tmp/t2.dmp

Export: Release 10.2.0.2.0 - Production on Sat Aug 18 04:53:44 2007

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


Username: system as sysdba
Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in UTF8 character set and UTF8 NCHAR character set
Note: table data (rows) will not be exported
About to export transportable tablespace metadata...
For tablespace T2 ...
. exporting cluster definitions
. exporting table definitions
. . exporting table                            TT2
. . exporting table                             T4
. exporting referential integrity constraints
. exporting triggers
. end transportable tablespace metadata export
Export terminated successfully without warnings.

step2:用SYS登陆在表空间上新增一个表T5

SQL> conn / as sysdba
Connected.
SQL> alter tablespace t2 read write;

Tablespace altered.

SQL> create table t5(id number) tablespace t2;

Table created.
SQL> insert into t5 values (2323);

1 row created.

SQL> /

1 row created.

SQL> /

1 row created.

SQL> select owner,table_name,tablespace_name from all_tables where tablespace_name='T2';

OWNER                          TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------ ------------------
SYS                            T5                             T2
SPARK                          TT2                            T2
SPARK                          T4                             T2


SQL> alter tablespace t2 read only;

Tablespace altered.





oracle@standby: /home/oracle> exp tablespaces=t2 transport_tablespace=y file=/tmp/t2.dmp

Export: Release 10.2.0.2.0 - Production on Sat Aug 18 04:55:17 2007

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


Username: system as sysdba
Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in UTF8 character set and UTF8 NCHAR character set
Note: table data (rows) will not be exported
About to export transportable tablespace metadata...
EXP-00008: ORACLE error 29341 encountered
ORA-29341: The transportable set is not self-contained
ORA-06512: at "SYS.DBMS_PLUGTS", line 1387
ORA-06512: at line 1
EXP-00000: Export terminated unsuccessfully

Step3,可以导出表空间,但不是传输
oracle@standby: /home/oracle> exp tablespaces=t2 file=/tmp/t2.dmp

Export: Release 10.2.0.2.0 - Production on Sat Aug 18 04:57:09 2007

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


Username: system as sysdba
Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in UTF8 character set and UTF8 NCHAR character set

About to export selected tablespaces ...
For tablespace T2 ...
. exporting cluster definitions
. exporting table definitions
. . exporting table                             T4          1 rows exported
. . exporting table                            TT2          9 rows exported
. exporting referential integrity constraints
. exporting triggers
Export terminated successfully without warnings.

论坛徽章:
0
2 [报告]
发表于 2007-08-23 15:19 |只看该作者
不要用sys用户来创建t5,用除sys,system以外的用户创建
exp不会导出sys用户的objects

论坛徽章:
0
3 [报告]
发表于 2007-09-27 08:18 |只看该作者

回复 #2 numenhuang 的帖子

谢谢!
学习!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP