dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
UNDOTBS1 ONLINE
SYSAUX ONLINE
TEMP ONLINE
USERS ONLINE
EXAMPLE ONLINE
RMANTBS ONLINE
TEST ONLINE
8 rows selected.
5.
SQL> select block_size from dba_tablespaces where tablespace_name='TEST';
BLOCK_SIZE
----------
8192
SQL> show parameter BLOCK_SIZE
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_block_size integer 8192
[oracle@localhost orclstd]$ scp oracle@192.168.1.222:/u01/app/oracle/oradata/orcl/test.dbf /u01/dmp
oracle@192.168.1.222's password:
test.dbf 100% 50MB 5.6MB/s 00:09
[oracle@localhost orclstd]$ impdp test/oracle dumpfile=test.dmp directory=dump_dir nologfile=y transport_datafiles=/u01/dmp/test.dbf remap_schema=test:test
Import: Release 10.2.0.1.0 - Production on Sunday, 13 April, 2014 20:36:05
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "TEST"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "TEST"."SYS_IMPORT_TRANSPORTABLE_01": test/******** dumpfile=test.dmp directory=dump_dir nologfile=y transport_datafiles=/u01/dmp/test.dbf remap_schema=test:test
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
ORA-39123: Data Pump transportable tablespace job aborted
ORA-19721: Cannot find datafile with absolute file number 7 in tablespace TEST
Job "TEST"."SYS_IMPORT_TRANSPORTABLE_01" stopped due to fatal error at 20:38:33
返回查看:
SQL> select file_name,tablespace_name from dba_data_files where tablespace_name='TEST';
FILE_NAME
--------------------------------------------------------------------------------
TABLESPACE_NAME
------------------------------
/u01/app/oracle/oradata/orcl/tests.dbf
TEST
看来是拷贝错了数据文件,重头再来:
SQL> alter tablespace test read only;
Tablespace altered.
[oracle@linux5 orcl]$ expdp system/oracle dumpfile=test.dmp directory=dump_file_dir transport_tablespaces=test nologfile=y
Export: Release 10.2.0.1.0 - Production on Monday, 14 April, 2014 1:27:00
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01": system/******** dumpfile=test.dmp directory=dump_file_dir transport_tablespaces=test nologfile=y
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is:
/u01/imp_exp/dmp/test.dmp
Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 01:27:26
[oracle@localhost dmp]$ scp oracle@192.168.1.222:/u01/imp_exp/dmp/test.dmp /u01/dmp
oracle@192.168.1.222's password:
test.dmp 100% 64KB 64.0KB/s 00:01
[oracle@localhost dmp]$ scp oracle@192.168.1.222:/u01/app/oracle/oradata/orcl/tests.dbf /u01/dmp
oracle@192.168.1.222's password:
tests.dbf 100% 50MB 2.1MB/s 00:24
SQL> alter tablespace test read write;
Tab