Logging

Database Migration Service uses Cloud Logging. You can access two log categories to acquire detailed information on events that occur with relation to your migration jobs: Database Migration Service logs, and the destination AlloyDB for PostgreSQL logs.

Database Migration Service logs

Database Migration Service for Oracle to AlloyDB for PostgreSQL provides structured logs for the datamigration.googleapis.com/MigrationJob and datamigration.googleapis.com/ConnectionProfile resources. These logs represent real-world events, such as when a migration job is created, when Database Migration Service reads information from your source database, or when a connection profile is edited.

Each log entry contains a jsonPayload.textMessage field with a description to help you better understand the event. There are different types of messages, for example:

Sample log messages for the datamigration.googleapis.com/MigrationJob resource
Log text message Description
FULL DUMP read is completed for table: {SCHEMA_TABLE_NAME} This message means that Database Migration Service finished reading specific table data in your source database for the full dump phase. This message indicates that the full dump phase for the table is in an advanced stage and is likely to complete shortly.
Successfully loaded {NUMBER} FULL DUMP rows into table: {SCHEMA_TABLE_NAME} This message means that Database Migration Service finished writing a batch of rows into a specific table in your destination cluster during the full dump phase.
Successfully applied {NUMBER} CDC rows into table: {SCHEMA_TABLE_NAME} This message means that Database Migration Service finished writing a batch of rows into a specific table in your destination cluster during the CDC phase.
Accessing data of table: {SCHEMA_TABLE_NAME} for data processing purpose When you use a CMEK for your migration job, this message indicates that Database Migration Service accessed the encryption key to process data for a specific table.

You can use Cloud Logging to filter logs by the message contents. For more information, see View and query logs.

AlloyDB for PostgreSQL cluster logs

AlloyDB for PostgreSQL also provides log entries for your destination cluster. See the AlloyDB for PostgreSQL logs reference in the Cloud Logging documentation.

View and query logs

To view your logs, perform the following:

  1. In the Google Cloud console, go to the Migration jobs page.

    Go to Migration jobs

  2. In the Jobs tab, click the display name of the migration job for which you want to view logs.

    The migration job details page opens.

  3. On the migration job details page, click View logs and perform one of the following:
    • To view migration job logs, select Migration job logs.
    • To view logs for your AlloyDB for PostgreSQL destination cluster, select Destination instance logs.

    The Logs Explorer page opens.

  4. On the Logs Explorer page, you can use the drop-down menus to modify the query and filter log entries. For example, to filter migration job logs for events where Database Migration Service accessed a specific table in your source database, you can use a query similar to the following:
    resource.type="datamigration.googleapis.com/MigrationJob"
    resource.labels.migration_job_id="MIGRATION_JOB_ID"
    jsonPayload.textMessage:"Accessing data of table"
    

What's next