DIRECTORY = my_dir
DUMPFILE = expdp_tabs.dmp
LOGFILE = expdp_tabs.log
SCHEMAS = scott,hr,oe
INCLUDE = TABLE:"IN ('EMP','EMPLOYEES','CATEGORIES_TAB')"
Great solution but not scalable.
Dig to find – How to export tables from multiple schemas with Oracle Data Pump in
Oracle 10g and 11g databases
http://uralural.blogspot.com/2011/06/how-to-export-tables-from-multiple.html
I will let you read the post; however, the following was the key for me.
[oracle@srvdb01]:/transfer/uural/datapumpdemo > expdp '"/ as sysdba"'
directory=UURAL_DATAPUMPDEMO
dumpfile=u0001-u0002_tables logfile=u0001-u0002_tables schemas=U0001,U0002
INCLUDE=TABLE:\"IN \(SELECT table_name FROM u0001.expdp_tables\)\"
Database has 22 partition tables.
*** List partition tables, exluding MVIEW ***
22 rows selected.
There are 11 schemas with partition tables.
*** List partition tables count by owner, exluding MVIEW ***
11 rows selected.
Partition table SYSTEM_QUEUE resides in 7 different schemas and
ACCOUNT_OBJECT_TRANSACTIONS resides in 2 different schemas.
*** List same table name across owner, exluding MVIEW ***
TABLE_NAME COUNT(*)
------------------------------ ----------
SYSTEM_QUEUE 7
ACCOUNT_OBJECT_TRANSACTIONS 2
评论