这表示该表空里的对象集是自包含的(对象及其索引都在此表空间中)
3.设定表空间为只读
alter tablespace hexiong read only;
4.开始exp
SQL> host exp userid=\'sys/change_on_install as sysdba\' transport_tablespace=y tablespaces=(hexiong) file=/u01/app/oracle/exphexiong.dmp
Export: Release 9.2.0.4.0 - Production on ÐÇÆÚÈÕ 7ÔÂ 30 19:27:00 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Note: table data (rows) will not be exported
About to export transportable tablespace metadata...
For tablespace HEXIONG ...
. exporting cluster definitions
. exporting table definitions
. . exporting table T
. exporting referential integrity constraints
. exporting triggers
. end transportable tablespace metadata export
Export terminated successfully without warnings.
5.将导出的文件以及相关源表空间的数据文件拷到目标数据库或机器上
导出文件:/u01/app/oracle/exphexiong.dmp
数据文件:
SQL> select b.name from v$tablespace a, v$datafile b where a.ts#=b.ts# and a.name='HEXIONG';
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/bjlnx1/hexiong.dbf
6.进入目标机器上,创建对应表空间的用户,不必指定缺省表空间
设exphexiong.dmp以及hexiong.dbf的位置都在/home/oradba上
cd /home/oradba
SQL>create user hexiong identified by hexiong;
7.导入:
imp file=exphexiong.dmp userid=\'sys/change_on_install as sysdba\' transport_tablespace=y datafiles=/home/oradba/hexiong.dbf