Using IBM Db2 for z/OS as a source for AWS SCT - AWS Schema Conversion Tool

Using IBM Db2 for z/OS as a source for AWS SCT

You can use AWS SCT to convert schemas, code objects, and application code from IBM Db2 for z/OS to the following targets.

  • Amazon RDS for MySQL

  • Amazon Aurora MySQL-Compatible Edition

  • Amazon RDS for PostgreSQL

  • Amazon Aurora PostgreSQL-Compatible Edition

Privileges for Db2 for z/OS as a source

The privileges needed to connect to a Db2 for z/OS database and read system catalogs and tables are listed following:

  • SELECT ON SYSIBM.LOCATIONS

  • SELECT ON SYSIBM.SYSCHECKS

  • SELECT ON SYSIBM.SYSCOLUMNS

  • SELECT ON SYSIBM.SYSDATABASE

  • SELECT ON SYSIBM.SYSDATATYPES

  • SELECT ON SYSIBM.SYSDUMMY1

  • SELECT ON SYSIBM.SYSFOREIGNKEYS

  • SELECT ON SYSIBM.SYSINDEXES

  • SELECT ON SYSIBM.SYSKEYCOLUSE

  • SELECT ON SYSIBM.SYSKEYS

  • SELECT ON SYSIBM.SYSKEYTARGETS

  • SELECT ON SYSIBM.SYSJAROBJECTS

  • SELECT ON SYSIBM.SYSPACKAGE

  • SELECT ON SYSIBM.SYSPARMS

  • SELECT ON SYSIBM.SYSRELS

  • SELECT ON SYSIBM.SYSROUTINES

  • SELECT ON SYSIBM.SYSSEQUENCES

  • SELECT ON SYSIBM.SYSSEQUENCESDEP

  • SELECT ON SYSIBM.SYSSYNONYMS

  • SELECT ON SYSIBM.SYSTABCONST

  • SELECT ON SYSIBM.SYSTABLES

  • SELECT ON SYSIBM.SYSTABLESPACE

  • SELECT ON SYSIBM.SYSTRIGGERS

  • SELECT ON SYSIBM.SYSVARIABLES

  • SELECT ON SYSIBM.SYSVIEWS

To convert Db2 for z/OS tables to PostgreSQL partitioned tables, gather statistics on tablespaces and tables in your database using the RUNSTATS utility as shown following.

LISTDEF YOURLIST INCLUDE TABLESPACES DATABASE YOURDB RUNSTATS TABLESPACE LIST YOURLIST TABLE (ALL) INDEX (ALL KEYCARD) UPDATE ALL REPORT YES SHRLEVEL REFERENCE

In the preceding example, replace the YOURDB placeholder with the name of the source database.

Connecting to Db2 for z/OS as a source

Use the following procedure to connect to your Db2 for z/OS source database with AWS SCT.

To connect to an IBM Db2 for z/OS source database

  1. In the AWS Schema Conversion Tool, choose Add source.

  2. Choose Db2 for z/OS, then choose Next.

    The Add source dialog box appears.

  3. For Connection name, enter a name for your database. AWS SCT displays this name in the tree in the left panel.

  4. Use database credentials from AWS Secrets Manager or enter them manually:

    • To use database credentials from Secrets Manager, use the following instructions:

      1. For AWS Secret, choose the name of the secret.

      2. Choose Populate to automatically fill in all values in the database connection dialog box from Secrets Manager.

      For information about using database credentials from Secrets Manager, see Using AWS Secrets Manager.

    • To enter the IBM Db2 for z/OS source database connection information manually, use the instructions in the following table.

      For this parameter Do this
      Server name

      Enter the Domain Name System (DNS) name or IP address of your source database server.

      Server port

      Enter the port used to connect to your source database server.

      Location

      Enter the unique name of the Db2 location you want to access.

      User name and Password

      Enter the user name and password to connect to your source database server.

      AWS SCT uses the password to connect to your source database only when you choose to connect to your database in a project. To guard against exposing the password for your source database, AWS SCT doesn't store the password by default. If you close your AWS SCT project and reopen it, you are prompted for the password to connect to your source database as needed.

      Use SSL

      Choose this option if you want to use Secure Sockets Layer (SSL) to connect to your database. Provide the following additional information, as appropriate, on the SSL tab:

      • Trust store: The location of a trust store containing certificates. For this location to appear here, make sure to add it in Global settings.

      Store password

      AWS SCT creates a secure vault to store SSL certificates and database passwords. By turning this option on, you can store the database password and connect quickly to the database without having to enter the password.

      Db2 for z/OS driver path

      Enter the path to the driver to use to connect to the source database. For more information, see Downloading the required database drivers.

      If you store the driver path in the global project settings, the driver path doesn't appear on the connection dialog box. For more information, see Storing driver paths in the global settings.

  5. Choose Test Connection to verify that AWS SCT can connect to your source database.

  6. Choose Connect to connect to your source database.