Possible bug? Export User Objects for partitioned tables

markpace

Member
Hello there,

I don't know if this is a bug or I'm doing something wrong; I've tried to generate the SQL file for a by-range partitioned table with by-list subpartitions; I've checked all the options (include Privileges, Storage and Owner), but the partition options are not generated, it is considered as a non-partitioned table. The only way to obtain partition options is to right click the table and to choose DBML_Metadata -> DDL, but in this way the script automatically includes phisical storage informations that I cannot use.

Any comment/help?
Thanks, Mark
 
There is currently no explicit support for subpartitions, so you will not find them in generated DDL. This is on the list of enhancement requests though.
 
select dbms_metadata.get_ddl( 'OBJECT_TYPE', 'NAME', 'OWNER' ) from dual

this will return oracle generated ddl that you can use...
 
Marco, thanks for you attention.
rbrooker, thank you for your hint: I can use it just as a workaround, as it doesn't allow you to include/exclude storage parameters; very useful anyway.

Mark
 
or, you can use "Partition clause Regenerator" Browser Extender extension. You can read about it at our forum (bottom of the page). Using that extension you can for example hide system defined subpartinion names.

We have also created an extension to better support dbms_metadata.get_ddl

DDL Wizard.

allows better suit your needs for generated code. This extension will create DDL for any object using easy to use wizard form. DDL statements are created using only dbms_metadata package. You can specify what should be included in generated code. For example when you call wizard for TABLE object you can specify the following elements:

* segment attribute
* tablespace name
* storage
* constraints - and if constraints should be generated as alter statement
* referential constraints

also you can specify to generate additional objects definitions like:

* table and column comments
* indexes
* triggers

You can find in extension code how to use dbms_metadata package to obtain what you want to see :)
 
Back
Top