exp/imp expdp/impdp Tables 萬用字元 % 的使用

myhuaer發表於2008-05-08
$ exp scott/tiger file=scott.dmp tables=%emp%; --xemp1,emp1 等等
$ exp scott/tiger file=scott.dmp tables=%; --scott schema 下所有table
$ expdp scott/tiger DIRECTORY=DUMP_DIR DUMPFILE=scott.dmp tables=%emp%
$ impdp scott/tiger DIRECTORY=DUMP_DIR DUMPFILE=scott.dmp tables=emp%
$ exp scott/tiger file=scott.dmp tables=%emp%
Export: Release 9.2.0.4.0 - Production on Thu May 8 13:55:13 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export done in UTF8 character set and UTF8 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table EMP3 11 rows exported
. . exporting table XEMP3 13 rows exported
. . exporting table XEMP2 13 rows exported
. . exporting table EMP4 10 rows exported
. . exporting table XEMP4 13 rows exported
. . exporting table EMP2 12 rows exported
. . exporting table EMP1 13 rows exported
. . exporting table XEMP1 13 rows exported
Export terminated successfully without warnings.
Processing ...
drop table scott.emp1
Processing ...
drop table scott.emp2
Processing ...
drop table scott.emp3
Processing ...
drop table scott.emp4
Processing ...
drop table scott.xemp1
Processing ...
drop table scott.xemp2
Processing ...
drop table scott.xemp3
Processing ...
drop table scott.xemp4
$ imp scott/tiger file=scott.dmp tables=%emp%
Import: Release 9.2.0.4.0 - Production on Thu May 8 13:56:41 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
import done in UTF8 character set and UTF8 NCHAR character set
. importing SCOTT's objects into SCOTT
. . importing table "EMP3" 11 rows imported
. . importing table "XEMP3" 13 rows imported
. . importing table "XEMP2" 13 rows imported
. . importing table "EMP4" 10 rows imported
. . importing table "XEMP4" 13 rows imported
. . importing table "EMP2" 12 rows imported
. . importing table "EMP1" 13 rows imported
. . importing table "XEMP1" 13 rows imported
Import terminated successfully without warnings.
--10g 10.2.3
[oracle@itc-test9 dumps]expdp scott/tiger DIRECTORY=DUMP_DIR DUMPFILE=scott.dmp tables=%emp%
Export: Release 10.2.0.3.0 - 64bit Production on Thursday, 08 May, 2008 14:45:18
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Starting "SCOTT"."SYS_EXPORT_TABLE_01": scott/******** DIRECTORY=DUMP_DIR DUMPFILE=scott.dmp tables=%emp%
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 192 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "SCOTT"."EMP" 7.828 KB 14 rows
. . exported "SCOTT"."EMP1" 7.828 KB 14 rows
. . exported "SCOTT"."EMP2" 7.828 KB 14 rows

Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
/home/oracle/ora_dir/dumps/scott.dmp
Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 14:45:34
drop table scott.emp2
drop table scott.emp1
[oracle@itc-test9 dumps]
[oracle@itc-test9 dumps]impdp scott/tiger DIRECTORY=DUMP_DIR DUMPFILE=scott.dmp tables=emp%
Import: Release 10.2.0.3.0 - 64bit Production on Thursday, 08 May, 2008 14:49:16
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Master table "SCOTT"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "SCOTT"."SYS_IMPORT_TABLE_01": scott/******** DIRECTORY=DUMP_DIR DUMPFILE=scott.dmp tables=emp%
Processing object type TABLE_EXPORT/TABLE/TABLE
ORA-39151: Table "SCOTT"."EMP" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "SCOTT"."EMP1" 7.828 KB 14 rows
. . imported "SCOTT"."EMP2" 7.828 KB 14 rows

Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SCOTT"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 14:49:19
[oracle@itc-test9 dumps]
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/34596/viewspace-1003614/,如需轉載,請註明出處,否則將追究法律責任。

相關文章