You can use the Data Object editor to create new data
objects by generating and running a DDL script.
Procedure
To create data objects with the Data Object editor:
- Open the Data Object Editor using
one of the following methods:
- In the Data Source Explorer, right-click a data object folder,
and select Create.
- In the
Administration Explorer (for prodocts that include this view), right-click
a data object folder, and select New DatabaseObject.
If you are prompted to specify which editor you want to use, select Data
Object Editor.
The Data Object editor opens. Note: Other menu actions
on this object and its children, such as Refresh, Drop,
or Generate DDL, are disabled while the editor
is open.
- Expand the database object in the database connection.
- Right-click a folder, and select ,
where DatabaseObject is the name of the object
in the folder. If the Create action
is not available, then the object that you selected is not supported
for creation. The Data Object editor opens.
Note: Other
menu actions for this object and its children in the Data Source Explorer,
such as Refresh, Drop,
or Generate DDL, are disabled while the editor
is open.
- In the Data Object Properties section
of the editor, use the properties tabs to set properties for the object. If there is an existing object in this database connection with
properties that are similar to the one that you want to create, you
can click Import Definition to set the properties
of this new object based on the properties of the existing object.
Note: This
option is not available for all data objects.
- Expand the Impacted Objects section
of the editor, and select impacted objects from the tree to include
in the generated DDL script.
The objects that are displayed
in the tree are potentially impacted by changes to the object that
you want to create.
Other than the root object, the tree typically
contains impacted objects only if you add an object to an existing
object. Otherwise, the only impacted object is the object that you
are creating.
- Expand the DDL section
of the editor, and click Preview DDL to preview
the generated DDL script.
If you make additional
changes in the Data Object Properties or Impacted
Objects sections, click Preview DDL again
to refresh the generated script.
You cannot type directly in
the DDL section of the editor. If you want to modify the generated
DDL script, click Open with SQL editor to open
the script in the SQL editor, where you can make changes and save
the script to an
existing data project. You can also use this option to save your
changes to an SQL script that you can run later.
- After you are satisfied with the generated
DDL script, click Run DDL in the Data
Object Properties section.
Results
The generated DDL script is run on the database,
and the new object is displayed in the explorer. The Data Output view
displays the results, including any errors that occurred.