資料庫遷移服務會使用
Private Service Connect,透過私人 IP 位址連線至目的地 AlloyDB for PostgreSQL 執行個體。透過 Private Service Connect,您可以將目的地資料庫公開給傳入的安全連線,並控管可存取資料庫的使用者。這項連線會由資料庫移轉服務加密。
Private Service Connect 的網路架構設定,取決於您使用的目的地 AlloyDB for PostgreSQL 執行個體是否已啟用 PSC。
適用於已啟用 PSC 的 AlloyDB for PostgreSQL 叢集
如要為目的地 AlloyDB for PostgreSQL 執行個體使用私人 IP 連線,最簡單的方法是建立已啟用 PSC 的 AlloyDB for PostgreSQL 執行個體。
圖 2. 移轉網路範例:公開 IP 來源連線。(按一下即可放大)
啟用 PSC 的叢集需求條件
如要使用已啟用 PSC 的 AlloyDB for PostgreSQL 叢集,您必須建立已啟用 PSC 的目的地執行個體。限制如下:
功能限制
啟用 PSC 的 AlloyDB for PostgreSQL 叢集會有一些功能限制。請確認這類設定符合您的需求。請參閱 AlloyDB for PostgreSQL 說明文件中的「
Private Service Connect 限制」。
建立限制
您只能使用 gcloud 或 AlloyDB for PostgreSQL API,建立已啟用 PSC 的 AlloyDB for PostgreSQL 叢集。
[[["容易理解","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,["# Networking methods for destination database connectivity\n\nDatabase Migration Service can connect to your destination cluster's public or private IP\naddress. This page provides an overview of each available destination database\nconnectivity method, as well as a recommendation section to help you choose\nthe right solution for your migration:\n\n- [Method comparison](#methods-comparison) provides a comparison table for available\n destination connectivity methods.\n\n- [Public IP connectivity](#public-ip) describes destination connectivity over\n public internet.\n\n- [Private IP connectivity](#private-ip) explains how Database Migration Service uses\n Private Service Connect to connect to the private IP of your\n destination cluster.\n\nAfter you familiarize yourself with different connectivity methods and their\nrequirements, you can use the\n[decision tree diagram](#decision-tree) to pick the right solution for your scenario.\n\nMethod comparison\n-----------------\n\nEvery destination connectivity method comes with different benefits and requirements.\nUse the following table to compare them at a glance, and then learn more\ndetails in the sections dedicated for each method.\n\nPublic IP connectivity\n----------------------\n\nWhen you use the public IP connectivity method, Database Migration Service attempts\nto establish a connection to the public IP address of your destination\nAlloyDB for PostgreSQL instance. This connection is encrypted and secured\nby Database Migration Service.\n[](#lightbox-trigger) **Figure 1.** Migration networking example: public IP destination connectivity. (click to enlarge)\n\n### Requirements for public IP connectivity\n\nTo use this connectivity method you need to ensure that your destination\nAlloyDB for PostgreSQL instance has a public IP address enabled. For more information, see\n[Configure public IP](/alloydb/docs/connect-public-ip#enable-ip) in the AlloyDB for PostgreSQL documentation.\n\n### Configure IP allowlist connectivity\n\nConfiguring public IP connectivity is covered in\n[Configure public IP connectivity](/database-migration/docs/oracle-to-alloydb/configure-dst-connection-public-ip).\n\nPrivate IP connectivity\n-----------------------\n\nDatabase Migration Service uses [Private Service Connect](/vpc/docs/private-service-connect) to connect to your destination\nAlloyDB for PostgreSQL instance using a private IP address.\nWith Private Service Connect, you can expose your destination\ndatabase to incoming secure connections, and control who can access the database.\nThis connection is encrypted by Database Migration Service.\n\nNetwork architecture setup for Private Service Connect differs\ndepending on whether you use a PSC-enabled or a non-PSC-enabled destination\nAlloyDB for PostgreSQL instance.\n\n### For PSC-enabled AlloyDB for PostgreSQL clusters\n\nThe easiest way to use private IP connectivity for destination AlloyDB for PostgreSQL\ninstances is to create a PSC-enabled AlloyDB for PostgreSQL instance.\n[](#lightbox-trigger) **Figure 2.** Migration networking example: public IP source connectivity. (click to enlarge)\n\n#### Requirements for PSC-enabled clusters\n\nTo use PSC-enabled AlloyDB for PostgreSQL clusters, you need to create the destination\ninstance with PSC enabled. The following limitations apply:\n\n- **Functionality limitations**\n\n PSC-enabled AlloyDB for PostgreSQL clusters come with\n certain functionality limitations. Make sure such configurations meet your\n requirements. See\n [Private Service Connect limitations](/alloydb/docs/configure-private-service-connect#limitations) in\n AlloyDB for PostgreSQL documentation.\n- **Creation limitations**\n\n You can create PSC-enabled AlloyDB for PostgreSQL clusters only with\n `gcloud` or the AlloyDB for PostgreSQL API.\n\n#### Configure private connectivity for PSC-enabled clusters\n\nConfiguring private IP connectivity is covered in\n[Configure private IP connectivity for PSC-enabled clusters](/database-migration/docs/oracle-to-alloydb/configure-dst-connection-private-ip#psc-enabled).\n\n### For non-PSC-enabled clusters\n\nYou can use private IP connectivity even if you can't use a PSC-enabled\nAlloyDB for PostgreSQL instance as your destination database. The configuration is more\ncomplex, as it requires an additional bastion virtual machine (VM) in your\nnetwork to forward traffic between Database Migration Service and your destination's\nprivate IP.\n[](#lightbox-trigger) **Figure 3.** Migration networking example: public IP source connectivity. (click to enlarge)\n\n#### Requirements for non-PSC-enabled clusters\n\nPrivate IP connectivity for non-PSC-enabled AlloyDB for PostgreSQL clusters\nrequires the following:\n\n- You need to have a [Virtual Private Cloud network with private services access enabled](/vpc/docs/configure-private-services-access).\n\n This is the network that you peer with your AlloyDB for PostgreSQL destination cluster.\n- Your destination AlloyDB for PostgreSQL must have private IP enabled.\n\n- Additionally, you need to be able to create the following network components\n in your project:\n\n - A service attachment: A network resource that exposes destination\n AlloyDB for PostgreSQL private IP to other services in a Google Cloud VPC network.\n The Google Cloud project where you create the service attachment is\n the *service producer* . The *service consumer* is Database Migration Service.\n\n - PSC forwarding rules: A rule that routes the incoming traffic\n from the service attachment to the dedicated bastion VM.\n\n - A bastion VM: A Compute Engine VM with two network interface controllers\n (NICs). One is attached to the dedicated service attachment network; the other,\n to the network where AlloyDB for PostgreSQL is peered. The bastion VM runs\n a Dante SOCKS server to forward the connections.\n\n#### Configure private connectivity for non-PSC-enabled clusters\n\nConfiguring private IP connectivity is covered in\n[Configure private IP connectivity for non-PSC enabled instances](/database-migration/docs/oracle-to-alloydb/configure-dst-connection-private-ip#non-psc).\n\nDestination network connectivity decision tree\n----------------------------------------------\n\nWhen you are familiar with all supported destination connectivity methods\nand their requirements, you can follow the questions in the diagram\nto help you pick the right connectivity method for your scenario.\n**Figure 4.** Destination network connectivity decision tree.\n\nWhat's next\n-----------\n\n- Learn about source database connectivity. See\n [Networking methods for source database connectivity](/database-migration/docs/oracle-to-alloydb/networking-methods-source).\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)."]]