Export file created by EXPORT:V10.02.01 via conventional path
About to import transportable tablespace(s) metadata...
import done in AL32UTF8 character set and UTF8 NCHAR character set
. importing SYS's objects into SYS
. importing SYS's objects into SYS
. importing SEC's objects into SEC
. . importing table "TEST"
. importing SYS's objects into SYS
Import terminated successfully without warnings.
secooler@dbserver /imp$
7.通过登陆到sec用户中查询数据库对象,验证数据已经成功导入。
8.将表空间置为可读写状态,完成整个表空间的迁移任务。
sec@secooler> select TABLESPACE_NAME,STATUS from dba_tablespaces where TABLESPACE_NAME='TBS_SEC_D';
TABLESPACE_NAME STATUS
------------------------------ ---------
TBS_SEC_D READ ONLY
sec@secooler> alter tablespace SEC_D read write;
Tablespace altered.
sec@secooler> select TABLESPACE_NAME,STATUS from dba_tablespaces where TABLESPACE_NAME='TBS_SEC_D';
TABLESPACE_NAME STATUS
------------------------------ ---------
TBS_SEC_D ONLINE
【实验补充ing】
【模拟违反“自包含”第一条原则过程】
sec@ora10g> create table t (x number) tablespace USERS;
Table created.
sec@ora10g> create index t_idx on t(x) tablespace TBS_SEC_D;
Index created.
sec@ora10g> conn / as sysdba
Connected.
sys@ora10g> exec dbms_tts.transport_set_check('USERS',true);
PL/SQL procedure successfully completed.
sys@ora10g> select * from transport_set_violations;
no rows selected
sys@ora10g> exec dbms_tts.transport_set_check('USERS',true);
PL/SQL procedure successfully completed.
sys@ora10g> select * from transport_set_violations;
no rows selected
sys@ora10g> exec dbms_tts.transport_set_check('TBS_SEC_D',true);
PL/SQL procedure successfully completed.
sys@ora10g> select * from transport_set_violations;
VIOLATIONS
------------------------------------------------
Index SEC.T_IDX in tablespace TBS_SEC_D points to table SEC.T in tablespace USERS
将TBS_SEC_D,USERS两个表空间同时导出不会有问题:
ora10g@testdb183 /exp$ exp "'"/ as sysdba"'" file=exp_TBS.dmp log=exp_TBS.log transport_tablespace=y tablespaces=TBS_SEC_D,USERS triggers=y constraints=n grants=n
Export: Release 10.2.0.3.0 - Production on Tue Aug 25 19:40:09 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in AL32UTF8 character set and UTF8 NCHAR character set
Note: table data (rows) will not be exported
Note: grants on tables/views/sequences/roles will not be exported
Note: constraints on tables will not be exported
About to export transportable tablespace metadata...
For tablespace TBS_SEC_D ...
. exporting cluster definitions
. exporting table definitions
. . exporting table TEST
For tablespace USERS ...
. exporting cluster definitions
. exporting table definitions
. . exporting table T
. exporting triggers
. end transportable tablespace metadata export
Export terminated successfully without warnings.
单独将USERS表空间同时导出也不会有问题:
ora10g@testdb183 /exp$ exp "'"/ as sysdba"'" file=exp_TBS.dmp log=exp_TBS.log transport_tablespace=y tablespaces=USERS triggers=y constraints=n grants=n
Export: Release 10.2.0.3.0 - Production on Tue Aug 25 19:40:19 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
Export done in AL32UTF8 character set and UTF8 NCHAR character set
Note: table data (rows) will not be exported
Note: grants on tables/views/sequences/roles will not be exported
Note: constraints on tables will not be exported
About to export transportable tablespace metadata...
For tablespace USERS ...
. exporting cluster definitions
. exporting table definitions
. . exporting table T
. exporting triggers
. end transportable tablespace metadata export
Export terminated successfully without warnings.