Saturday 14 April 2012

Creating target table from Designer itself?

1) In target designer first create a target with all the necessary columns.
2) Then click Target--> Generate/Execute SQL.
3) A popup like below is shown:
4) Here we give the filename which will contain the create DDL query.
5) Then we connect to the database where we need to create the table using "Connect" button.
6) Then select the tables for which we need to generate and also select "Generation options" as required.
7) Click the "Generate SQL file " button . This will put the DDL in the filename we mentioned.
8) We can click "Edit SQL file" to edit the file..ex: changing the database name and making small changes to the column definitions.
9) Then click "Execute SQL file". In the output window you will see the result of the execution.
10) We can even click "Generate and Execute" if we want to generate and directly execute the DDL.

Changing the Source and target table names and database names after source/target is imported



After the source/target is imported from the database we can change the table name or Database name on the " "Tables" tab.
We can click rename to change the name of the table.
And To change the database name we can change the owner name.




We can also override the table and database name on the session by using the 
"Owner Name" and "Source table name" in source properties.
For Targets we use the fileds "Target Table name" and "Table name prefix" to change the table and database from the session.