Step 6: Create Amazon DMS Source and Target Endpoints - Database Migration Guide
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Step 6: Create Amazon DMS Source and Target Endpoints

While your replication instance is being created, you can specify the source and target database endpoints using the Amazon Web Services Management Console. However, you can only test connectivity after the replication instance has been created, because the replication instance is used in the connection.

  1. Sign in to the Amazon Web Services Management Console, open the Amazon DMS console, and then choose Endpoints.

  2. Specify your connection information for the source Oracle database and the target PostgreSQL database. The following table describes the source settings.

    Parameter Description

    Endpoint Identifier

    Enter a name, such as Orasource.

    Source Engine

    Choose oracle.

    Server name

    Provide the Oracle DB instance server name.

    Port

    The port of the database. The default for Oracle is 1521.

    SSL mode

    Choose an SSL mode if you want to enable encryption for your connection’s traffic.

    Username

    The user you want to use to connect to the source database.

    Password

    Provide the password for the user.

    SID

    Provide the Oracle database name.

    The following table describes the advanced source settings.

    Parameter Description

    Extra connection attributes

    Extra parameters that you can set in an endpoint to add functionality or change the behavior of Amazon DMS. Some of the most common and convenient parameters to set for an Oracle source database are the following. Separate multiple entries from each other by using a semi-colon (;).

    • addSupplementalLogging - This parameter automatically configures supplemental logging when set to Y.

    • useLogminerReader - By default, Amazon DMS uses LogMiner on the Oracle database to capture all of the changes on the source database. The other mode is called Binary Reader. When using Binary Reader instead of LogMiner, Amazon DMS copies the archived redo log from the source Oracle database to the replication server and reads the entire log in order to capture changes. The Binary Reader option is recommended if you are using ASM since it has performance advantages over LogMiner on ASM. If your source database is 12c, then the Binary Reader option is currently the only way to capture CDC changes in Oracle for LOB objects.

    To use LogMiner, enter the following: useLogminerReader=Y

    To use Binary Reader, enter the following: useLogminerReader=N; useBfile=Y`

    KMS key

    Enter the KMS key if you choose to encrypt your replication instance’s storage.

    For information about extra connection attributes, see Using Extra Connection Attributes.

    The following table describes the target settings.

    Parameter Description

    Endpoint Identifier

    Enter a name, such as Postgrestarget.

    Target Engine

    Choose postgres.

    Servername

    Provide the PostgreSQL DB instance server name.

    Port

    The port of the database. The default for PostgreSQL is 5432.

    SSL mode

    Choose None.

    Username

    The user you want to use to connect to the target database.

    Password

    Provide the password for the PostgreSQL DB instance.

    The following is an example of the completed page.

    
                     Completed replication task connections page
  3. After the endpoints and replication instance have been created, test each endpoint connection by choosing Run test for the source and target endpoints.

  4. Drop foreign key constraints and triggers on the target database.

    During the full load process, Amazon DMS does not load tables in any particular order, so it may load the child table data before parent table data. As a result, foreign key constraints might be violated if they are enabled. Also, if triggers are present on the target database, then it may change data loaded by Amazon DMS in unexpected ways.

  5. If you do not have one, then generate a script that enables the foreign key constraints and triggers.

    Later, when you want to add them to your migrated database, you can just run this script.

  6. (Optional) Drop secondary indexes on the target database.

    Secondary indexes (as with all indexes) can slow down the full load of data into tables since they need to be maintained and updated during the loading process. Dropping them can improve the performance of your full load process. If you drop the indexes, then you will need to add them back later after the full load is complete.

  7. Choose Next.