Developer Tool Guide > Physical Data Objects > Create or Replace Target Tables
  

Create or Replace Target Tables

In the Developer tool, you can generate a DDL script for one or more relational data objects in the Model repository, and run the DDL script to create or replace tables in the target database. If a target already exists in that database, you can drop the target and re-create it.
You can create or replace target table at design-time or at runtime. To create or replace tables at design-time, you must create and execute the DDL script before you run a mapping. You can configure the write transformation in a mapping to create or replace a relational target at run time.
The Developer tool generates a database-specific version of the DDL script for all supported connection types. If you select a JDBC or ODBC target, the Developer tool generates the ANSI SQL-92 generic data type format. You can generate DDL scripts for the following database types:
Note: You cannot generate a DDL script if you use an OLE DB SQL Server connection.

Rules and Guidelines to Create or Replace Target Tables

Consider the following rules and guidelines when you generate and execute a DDL script:

Generating and Executing DDL at Design-Time

Before you generate and run the DDL script, ensure that the user has the appropriate read and write permissions to access the target database.
    1. In the Object Explorer view of the Developer tool, select the relational data object for which you want to create a table in the target database. If you want to create multiple tables, hold down the Shift and Ctrl keys to select multiple data objects.
    2. Right-click a selected data object and select Generate and Execute DDL.
    The Generate and Execute DDL dialog box appears.
    The image shows the Generate and Execute DDL dialog box.
    3. In the Object Selection area, select the Target Database Type for which you want to generate DDL.
    4. In the DDL Generation area, you can select the following options:
    5. In the DDL Generation area, click Generate DDL.
    The DDL generated for the selected data objects appears in the DDL Generation area.
    Warning: If you edit the DDL script generated in the DDL Generation area, you might encounter errors when you run the DDL script.
    6. In the DDL Execution area, click Browse and choose a target database connection.
    The Choose Connection dialog box lists the target database connections based on the target database type that you choose in the Object Selection area. For example, if you choose Oracle as the target database type, the Developer tool displays Oracle connections.
    7. Click Execute DDL.
    8. Click Close.

Generating and Executing DDL at Runtime

You can configure the Write transformation in a mapping to create or replace a relational target at run time.
The Data Integration Service generates and executes the DDL script at run time. For more information, see the Informatica Developer Mapping Guide.

DDL Generation Errors

When you generate and run a DDL script, you might encounter an error. The error can occur due to one of the following reasons: