Create tables when they do not exist on a server - Connect_CDC - aws_mainframe_modernization_service - connect_cdc_mimix_share - Latest

AWS Mainframe Modernization - Data Replication for IBM i

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
AWS Mainframe Modernization > AWS Mainframe Modernization Service
Version
Latest
Language
English
Product name
AWS Mainframe Modernization
Title
AWS Mainframe Modernization - Data Replication for IBM i
Copyright
2024
First publish date
2003
Last updated
2024-02-01
Published on
2024-02-01T23:02:31.099696

To create tables that do not exist on the target server:

  • Obtain the Data Definition Language (DDL) on the existing table

  • Edit the file as needed

  • In this example, use SQL statements to create the new tables.

Note: Options exist to create DDL for selected tables or for all tables.

You can modify the DDL to customize it before running it on a target DBMS.

  • Add columns, as you would need to do in the case of journal mapping.

  • Change to a different target catalog or schema.

  • Change indexes.

  • Change parameters such as stogroup, database, or tablespace.

  • Copy DDL to multiple targets.

To create DDL for a single table:

  1. Highlight the table name.

  2. From the context menu, choose Generate DDL>This table only.

    Note: You can check multiple tables and choose All checked tables.

    When generating DDL for all tables, you can simply highlight the server name and choose Generate DDL For All Tables.

  3. A message indicates the name and location of the DDL file:

    Table definitions at <server name> written to <directory and filenames>

  4. Open the file in a text editor, such as Notepad.

  5. Edit if necessary.

  6. Select all or a portion and copy.

  7. Open a new SQL Server window on the target server:

    1. Highlight the server.

    2. Right click to bring up the context menu.

    3. Choose New SQL Window.

  8. Paste DDL in the SQL Server window.

  9. Click Go to execute the command.

  10. You receive a message in the SQL Server window indicating that you have successfully created tables on your target.