Process the SQL

When you select Create All Selected Table Objects, Drop All Selected Table Objects, Create Object, or Drop Object from the shortcut menu, the Create Utility generates the SQL needed to carry out the command. The SQL for each DB Alias is generated separately.

Review and edit SQL

From the Options menu, select Review SQL to display the generated SQL before you submit it for execution.

You can edit the generated SQL before it is submitted, but the utility does not validate your changes. Most DDL statements end with a semicolon. You must begin any added DDL statement that includes embedded semicolons with a BEGIN_SQL statement and end it with an END_SQL statement.

Example of the Review SQL display that is used to review and edit SQL before you submit it.

In this example, a table that is named TEST.CUSTOMERS is to be created. The SQL is displayed in the Review SQL dialog, and the DB Alias is included in the title. (In this case, the DB Alias is DBMS.)

Annotations

The annotations at the top indicate conditions that were identified while generating the SQL. These conditions include informational, warning, and error messages. Use the check boxes at the right to designate the types of message to target when you scroll by clicking Prev and Next. For example, select the Warning check box to scroll to the warning messages.

Although you might want to review informational and warning messages, only error messages prevent the SQL from executing.

Highlighted object names

At times, you might modify the Creator ID and name for a target object in the Table Map or the Create dialog, typically when a DDL type of object is targeted to a database different from the source. If the object is retrieved from the source DBMS catalog in text format (for example, a View or an Oracle Procedure), an SQL parser replaces Creator IDs and object names from the source with the appropriate target Creator IDs and object names. Any replacement text is highlighted to help you review and evaluate the changes. The default colors are blue and yellow, but you can modify the defaults by changing settings on the Create tab in Personal Options.

  • When the SQL parser is confident of a change, the object name is highlighted in the default color of blue.
  • If the SQL parser is uncertain of a change, the object name is highlighted in the default color of yellow.

You can right-click highlighted object names and choose commands from the shortcut menu as follows:

  • To display the object name from the source file, select Show Source Object Name.
  • To browse the source SQL for an object, select Browse Source Object SQL.

Adding DDL for a PostgreSQL object

In Optim 11.3, if a PostgreSQL object in a table map does not exist, a message is displayed instructing you to add the DDL for the target object. Here is an example of such a message.

-- Add the DDL for object <object name>


COMMIT;

If you want to create the object, paste the DDL for the target object before the COMMIT line in the displayed message.

Command buttons

Proceed
Submit the SQL. The Browse Output dialog opens to display the information that was generated by the database as a result of executing the SQL.
Skip
Do not submit the SQL for the current DB Alias and display the SQL for the next. If there is no SQL for other DB Aliases, return to the Create dialog.


Feedback