用expdp/impdp实现将数据从一个数据库导入另一个数据库(二)
2.0.2.0 Production on Wed May 15 15:20:58 2013
Copyright (c) 1982, 2010,
Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create directory test_dir as '/home/oracrp2/zzj';
Directory created.
SQL> Grant read,write on directory test_dir to cux;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
$ cd /home/oracrp2/zzj
$ ls
cux_expdp_test_table.dmp
$ impdp cux/cux DIRECTORY=test_dir DUMPFILE=cux_expdp_test_table.dmp TABLE_EXISTS_ACTION=TRUNCATE LOGFILE=cux_expdp_test_table.log
Import: Release 11.2.0.2.0 - Production on Wed May 15 15:21:55 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "CUX"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "CUX"."SYS_IMPORT_FULL_01": cux/******** DIRECTORY=test_dir DUMPFILE=cux_expdp_test_table.dmp TABLE_EXISTS_ACTION=TRUNCATE LOGFILE=cux_expdp_test_table.log
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "CUX"."CUX_EXPDP_TEST_TABLE" 5.460 KB 5 rows
Job "CUX"."SYS_IMPORT_FULL_01" successfully completed at 15:22:22
$ ls
cux_expdp_test_table.dmp cux_expdp_test_table.log
$