[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Create and configure your destination AlloyDB for PostgreSQL instance\n\nFor heterogeneous Oracle migrations to AlloyDB for PostgreSQL,\nDatabase Migration Service requires that you first create and configure your\nAlloyDB for PostgreSQL destination cluster and primary database.\nPerform the following steps:\n\n1. Create your destination cluster and primary database. 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-alloydb/known-limitations). **Note:** If you're migrating from a Cloud SQL for SQL Server instance, create the destination cluster in the same region as your source.\n\n We recommend that you create your destination cluster with settings\n specific to the\n [destination networking method](/database-migration/docs/oracle-to-alloydb/networking-methods-destination) you want to use:\n\n2. Create the following entities in your destination cluster:\n - A [database to migrate your data](/alloydb/docs/database-create).\n - A [dedicated migration user account](/alloydb/docs/database-users/about#create).\n\n This user account must have the same name as your destination database.\n For example, if you use Database Migration Service to migrate your data into\n a database called `myapp`, then the name of the dedicated\n migration user should also be `myapp`.\n3. Grant the required permissions to the dedicated migration user account. Do the following:\n 1. [Connect to your AlloyDB for PostgreSQL instance with the `psql` client](/alloydb/docs/connect-psql).\n 2. Run the following commands on your destination database: \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-alloydb/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-alloydb/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-alloydb/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-alloydb/networking-methods-destination).\n\n- Learn about migration jobs. See [Create a migration job](/database-migration/docs/oracle-to-alloydb/create-migration-job)\n\n- To get a complete, step-by-step migration walkthrough, see\n [Oracle to AlloyDB for PostgreSQL migration guide](/database-migration/docs/oracle-to-alloydb/guide)."]]