Database Migration Service는 Cloud Logging을 사용합니다. 두 가지 로그 카테고리에 액세스하여 마이그레이션 작업과 관련된 이벤트에 관한 자세한 정보를 확인할 수 있습니다. Database Migration Service 로그와 대상 PostgreSQL용 Cloud SQL 로그입니다.
PostgreSQL용 Cloud SQL 대상 인스턴스의 로그를 보려면 대상 인스턴스 로그를 선택합니다.
로그 탐색기 페이지가 열립니다.
로그 탐색기 페이지에서 드롭다운 메뉴를 사용하여 쿼리를 수정하고 로그 항목을 필터링할 수 있습니다. 예를 들어 데이터베이스 마이그레이션 서비스가 소스 데이터베이스의 특정 테이블에 액세스한 이벤트의 마이그레이션 작업 로그를 필터링하려면 다음과 유사한 쿼리를 사용하면 됩니다.
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-09-05(UTC)"],[[["\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)."]]