Oracle Utilities Tips
Exporting Data Subsets
This export utility allows the Remote DBA to limit the number of
rows exported, based on a SQL where clause. This is very
useful when only a portion of the table needs to be exported.
For example, to export only those rows from the table whose
order_number > 873737:
QUERY=\"WHERE order_number \>
The specification of the query text must compensate for
special characters that are specific to the operating system.
The query text above places the entire string in double quotes
and places an escape character (\) in front of special
characters. The query specification above would result in the
following SQL being executed:
select * from orders where
order_number > 873737;
Subsetting is just one method by which export performance can
be improved. The next section discusses other ways to optimize
To learn more about these techniques, see the book "Advanced
Oracle Utilities: The Definitive Reference".
You can buy it directly from the
and get instant access to the code depot of utilities scripts.