[Net 2000 Ltd. Home][DDL Wizard Home][DDL Wizard Manual][DDL Wizard FAQ]

The DDL Wizard
Object Rules Tab

The DDL Wizard can modify and manipulate the DDL of schema objects in order to make the code more suitable for use in recreating a schema or adding objects to another schema. The type of modification that can be performed is specific to the type of object. Here are some examples of things that can be done (where appropriate);
  • Strip off storage clauses, or reset the contents (INITIAL, NEXT etc.) to different values.
  • Strip off or reset clauses such as PCTFREE, PCTUSED etc.
  • Remove or replace tablespaces for objects. For example: all tablespace clause information can be removed causing the object to be recreated in the schemas default tablespace - or all tables could be placed in one tablespace and all indexes in another.
  • Change all of the CREATE clauses on packages, procedures etc. to CREATE OR REPLACE.
  • Set sequence DDL START WITH and INCREMENT BY clauses to desired values.
  • Re-point database links at different databases and change passwords etc.
  • All modification of the schema DDL can be performed within the DDL Wizard on an ad-hoc basis. However, if you find yourself in a situation where you need to perform the same actions repeatedly you can create rules that will perform the desired DDL modifications for you. These rules can be saved to the disk and reloaded when needed.

    The rule mechanism is quite sophisticated and rules are applied automatically in a cascading manner. The most general rules are applied first and more specific rules override them. For example: it is quite possible to enter a rule that changes the tablespace for all tables to the value ABC. However, a more specific rule placing all tables beginning with INV* in tablespace DEF could be generated and an even further override rule could put the specific table INVOICE in the tablespace XYZ.

    Note: Object rules are automatically applied as soon as they are entered. You do not need to "regenerate" or perform any other activation task. New rules are added using the Update/Add Rules button visible on the DDL Source dialog box.


    The DDL Wizard Object Rules Tab

    The panel at the top of the Object Rules Tab lists the currently active object rules. The panel is divided up into seven vertical columns. These columns provide specific information on various components of the rule.

    What the columns in the Object Rules Panel mean
    Order
    This is the order the rules will be applied in. They are automatically sorted from most general to most specific. The order will change as new rules are added and old rules are deleted.
    Rule Action
    This is the action the rule performs (substitute, discard etc.).
    Rule Acts On
    This column lists the type of object the rule will act on. If this column indicates Any Object the rule will be applied to all applicable object types. For example: you do not need to worry about CREATE TABLE DDL being affected by an OR REPLACE insert rule simply because the object type is not specified. The DDL Wizard only applies rules to the DDL object types for which they are appropriate.
    User
    Rules can be specific to a designated schema or can be applied in general to all schemas.
    Object Name
    Object manipulation rules can be applied to specific objects by name, all objects (*) or to objects based on wild card string matches (XYZ*, *XYZ and *XYZ*).
    Component
    This column indicates the specific component (PCTFREE clause, START WITH clause etc) that will be affected by the rule.
    Substitution String
    This column shows the text that will be substituted for a component. This field is only valid if the Rule Action column is Substitute Component.

    What the buttons do
    Drop Rule
    This button deletes an object rule from the DDL Wizard.
    Generate Clean & Strip Rules
    A commonly desired set of object rules are those which completely reset all DDL. In other words, strip off storage clauses, remove PCTFREE and associated clauses, and place OR REPLACE in the create statements of the appropriate DDL. This button generates a set of rules that will perform the above actions and has been put in place to save you the trouble of doing it manually. Many DBA's find these rules to be a useful starting point and manually add override rules for specific cases.


    [Net 2000 Ltd. Home][DDL Wizard Home][DDL Wizard Manual][DDL Wizard FAQ]