CONTENT Specifies data to unload. Valid keyword values are: [ALL], DATA_ONLY and METADATA_ONLY.
but while exporting/importing i would like to have only tables with out data for few tables with data.As you mentioned you need few tables without data and rest with data, so have a parfile mentioning those few tables in the tables parameter along with content=metadata_only. This will have the table structure without any data. When you import, only tables will be created. There won;t be any data as you export dump didn't had any.
Mehul Mehta wrote:If you use METADATA_ONLY you will export ALL THE TABLES, but only the definition and not the data.
But how should i use it? I think if i use METADATA_ONLY then only tables with out data will be imported.
Mehul Mehta wrote:Mehul, create a parfile and for the 5 tables you do not want to export data, use the query parameter with something like 'where 1=2' ... so it will skip data. Make sure you put all query clauses (one for each table) on consecutive lines.
AS i have mentioned earlier,
If i have 20 tables in one schema and i would like to have *15 tables with their data* and +5 with out data+.
This will export all tables in the schema_owner, and data for all tables except for tables listed above.
directory=my_dir dumpfile=... logfile=.. schemas=schema_owner # now only list tables for which you do not need data query=schema_owner.table1:"where 1=2" query=schema_owner.table2:"where 1=2" query=schema_owner.table3:"where 1=2" query=schema_owner.table4:"where 1=2" query=schema_owner.table5:"where 1=2" ...