resource.type="datamigration.googleapis.com/MigrationJob"
resource.labels.migration_job_id="MIGRATION_JOB_ID"
jsonPayload.textMessage:"Accessing data of table"
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-18 (世界標準時間)。"],[[["\u003cp\u003eDatabase Migration Service uses Cloud Logging to provide detailed information on migration job events, accessible through two log categories: Database Migration Service logs and destination Cloud SQL for PostgreSQL logs.\u003c/p\u003e\n"],["\u003cp\u003eDatabase Migration Service logs offer structured logs for MigrationJob, ConnectionProfile, and PrivateConnection resources, representing real-world events with descriptions in the \u003ccode\u003ejsonPayload.textMessage\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud SQL for PostgreSQL logs provide information related to the destination instance and are viewable via the Cloud SQL logs reference.\u003c/p\u003e\n"],["\u003cp\u003eLogs can be accessed and viewed by navigating to the Migration jobs page in the Google Cloud console, selecting a specific migration job, and then clicking "View logs" to choose either "Migration job logs" or "Destination instance logs".\u003c/p\u003e\n"],["\u003cp\u003eThe Logs Explorer allows users to filter logs by message content, enabling focused analysis, such as filtering for events where Database Migration Service accesses a specific table.\u003c/p\u003e\n"]]],[],null,["# Logging\n\nDatabase Migration Service uses Cloud Logging. You can access two log categories to\nacquire detailed information on events that occur with relation to your migration\njobs: Database Migration Service logs, and the destination Cloud SQL for PostgreSQL logs.\n\nDatabase Migration Service logs\n-------------------------------\n\nDatabase Migration Service for Oracle to Cloud SQL for PostgreSQL provides\n[structured logs](/logging/docs/structured-logging#structured_logging_special_fields) for the\n[`datamigration.googleapis.com/MigrationJob`](/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs#resource:-migrationjob),\n[`datamigration.googleapis.com/ConnectionProfile`](/database-migration/docs/reference/rest/v1/projects.locations.connectionProfiles),\nand\n[`datamigration.googleapis.com/PrivateConnection`](/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)\nresources.\nThese logs represent real-world events, such as when a migration job is created,\nwhen Database Migration Service reads information from your source database,\nor when a connection profile is edited.\n\nEach log entry contains a `jsonPayload.textMessage` field with a description to\nhelp you better understand the event. There are different types of messages,\nfor example:\n\nCloud SQL for PostgreSQL instance logs\n--------------------------------------\n\nCloud SQL for PostgreSQL also provides log entries for your destination instance.\nSee the\n[Cloud SQL logs reference](/logging/docs/api/platform-logs#cloud_sql) in the Cloud Logging documentation.\n\nView and query logs\n-------------------\n\nTo view your logs, perform the following:\n\n1. In the Google Cloud console, go to the **Migration jobs** page.\n\n [Go to Migration jobs](https://console.cloud.google.com/dbmigration/migrations)\n2. In the **Jobs** tab, click the display name of the migration job for which you want to view logs.\n\n The migration job details page opens.\n3. On the migration job details page, click **View logs** and perform one of the following:\n - To view migration job logs, select **Migration job logs**.\n - To view logs for your Cloud SQL for PostgreSQL destination instance, select **Destination instance logs**.\n\n The **Logs Explorer** page opens.\n4. 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: \n\n ```bash\n resource.type=\"datamigration.googleapis.com/MigrationJob\"\n resource.labels.migration_job_id=\"\u003cvar translate=\"no\"\u003eMIGRATION_JOB_ID\u003c/var\u003e\"\n jsonPayload.textMessage:\"Accessing data of table\"\n ```\n\nWhat's next\n-----------\n\n- For more information on using Logs Explorer, see\n [View logs by using Logs Explorer](/logging/docs/view/logs-explorer-interface).\n\n- For a detailed reference of what fields are supported in Database Migration Service\n log entries, see\n [Database Migration Service logs reference](/logging/docs/api/platform-logs#cloud_database_migration_service).\n\n- To get a complete, step-by-step migration walkthrough, see\n [Oracle to Cloud SQL for PostgreSQL migration guide](/database-migration/docs/oracle-to-postgresql/guide)."]]