PSC 지원 Cloud SQL 인스턴스를 마이그레이션 대상으로 사용할 수 있는지 확인합니다. PSC 지원 인스턴스의 기능 제한사항을 신중하게 고려하세요. Cloud SQL 문서의
Private Service Connect 제한사항을 참고하세요.
PSC 지원 Cloud SQL 인스턴스를 사용할 수 있는 시나리오의 경우 비공개 IP와 Private Service Connect가 모두 사용 설정된 대상 인스턴스를 만듭니다. PostgreSQL용 Cloud SQL 문서의
PSC 지원 Cloud SQL 인스턴스 만들기를 참고하세요.
PSC 지원 Cloud SQL 인스턴스를 사용할 수 없는 시나리오에서는 비공개 IP가 사용 설정된 대상 인스턴스를 만듭니다. PostgreSQL용 Cloud SQL 문서의
비공개 IP가 사용 설정된 Cloud SQL 인스턴스 만들기를 참고하세요.
선택사항: 변환된 스키마를 테스트할 목적으로 마이그레이션 사용자에게 CREATEDB 권한을 부여합니다.
마이그레이션의 후반 단계에서
소스 스키마를 변환한 후 Database Migration Service를 사용하여 변환된 스키마를 PostgreSQL 데이터베이스에 적용할 수 있는지 테스트할 수 있습니다. 테스트를 실행하기 위해 Database Migration Service는 대상 데이터베이스에 영향을 주지 않도록 임시 데이터베이스를 만듭니다.
변환된 스키마를 테스트하려면 이전 사용자에게 CREATEDB 권한을 부여합니다.
다음 명령어를 사용하세요.
[[["이해하기 쉬움","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-01(UTC)"],[],[],null,["# Create and configure your destination Cloud SQL instance\n\nFor heterogeneous Oracle migrations to Cloud SQL,\nDatabase Migration Service requires that you first create and configure your\nCloud SQL destination instance. Perform the following steps:\n\n1. Create your destination instance. Make sure you configure enough compute and memory resources to cover your migration needs and follow the requirements listed in [known limitations](/database-migration/docs/oracle-to-postgresql/known-limitations).\n\n We recommend that you create your destination instance with settings\n specific to the\n [destination networking method](/database-migration/docs/oracle-to-postgresql/networking-methods-destination) you want to use:\n\n2. Create the following entities in your destination instance:\n - A [database to migrate your data](/sql/docs/postgres/create-manage-databases).\n - A [dedicated migration user account](/sql/docs/postgres/create-manage-users#creating).\n3. Grant the required permissions to the dedicated migration user account. Do the following:\n 1. Connect to your Cloud SQL instance with a SQL client. You can use the following methods:\n - [`psql` client](/sql/docs/postgres/connect-admin-ip). You can use this method to connect to your instance private IP, but it might require that you create a Compute Engine virtual machine.\n - [`gcloud sql connect`](/sdk/gcloud/reference/sql/connect) command. This command works only for Cloud SQL instances that have a public IP address enabled.\n 2. Run the following command on your destination instance: \n\n ```sql\n GRANT CREATE ON DATABASE DESTINATION_DB_NAME TO \"\u003cvar translate=\"no\"\u003eMIGRATION_USER_ACCOUNT_NAME\u003c/var\u003e\";\n ```\n 3. Optional: Grant your migration user the `CREATEDB`\n permission for the purposes of testing converted schema.\n\n At a later point in the migration, after you\n [convert the source schema](/database-migration/docs/oracle-to-postgresql/convert-sql), you can use Database Migration Service\n to test whether converted schema can be applied to a PostgreSQL\n database. To perform the test, Database Migration Service creates a temporary\n database to avoid impacting your destination database.\n If you want to\n [test your converted schema](/database-migration/docs/oracle-to-postgresql/work-with-conversion-workspaces#test-apply-to-dest),\n grant your migration user the `CREATEDB` permission.\n Use the following command: \n\n ```sql\n ALTER USER \"\u003cvar translate=\"no\"\u003eMIGRATION_USER_ACCOUNT_NAME\u003c/var\u003e\" WITH CREATEDB;\n ```\n 4. **For source databases that contain foreign keys or triggers** : Skip replication for foreign keys and triggers by using the [`REPLICATION`](https://www.postgresql.org/docs/current/role-attributes.html#id-1.6.9.6.2.1.5.1.1) option with the dedicated migration user account. Run the following command: \n\n ```sql\n ALTER USER \"\u003cvar translate=\"no\"\u003eMIGRATION_USER_ACCOUNT_NAME\u003c/var\u003e\" WITH REPLICATION;\n ```\n\n For more information about how Database Migration Service migrates foreign keys\n and triggers, see\n [Considerations for foreign keys and triggers](/database-migration/docs/oracle-to-postgresql/known-limitations#foreign-keys-triggers-considerations).\n\nWhat's next?\n------------\n\n- Learn about destination database network connectivity. See\n [Destination database networking methods](/database-migration/docs/oracle-to-postgresql/networking-methods-destination).\n\n- Learn about migration jobs. See [Create a migration job](/database-migration/docs/oracle-to-postgresql/create-migration-job)\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)."]]