To be frank, I consider myself novice when it comes to
advanced export/import requirements. This is because I don’t deal with these
utilities on a day-to-day basis.
A simple requirement came across my desk to export selected
tables from a schema based on a common filter.
Requirement:
Say, you have 5 tables T1, T2, T3, T4, and T5. All have “ID”
as the primary key column and you have to export data from these tables only if
it is found in COMMON_TABLE. The COMMON_TABLE stores “ID” to be exported.
Solution:
The first place that I look for solution is “Oracle
Documentation”. I knew we can filter a table using “QUERY” parameter of Data Pump
Export but did not know how to apply it on multiple tables.
The syntax of the QUERY parameter is:
QUERY = [schema.][table_name:] query_clause
If you omit [schema.][table_name:] then the query is applied
to all the tables in the export job.
So, here’s my export command:
Thanks for reading!!!
No comments:
Post a Comment