您需要了解两个重要概念,才能知道数据如何从源实例流向目标实例:迁移类型和迁移阶段。Database Migration Service 支持两种类型的迁移:持续迁移和一次性迁移。对于从 Oracle 到 Cloud SQL for PostgreSQL 的异构迁移,仅支持持续迁移。
在持续迁移中,数据迁移分为两个阶段:完全转储和变更数据捕获 (CDC)。
完全转储阶段
完全转储阶段是迁移流程的第一部分。在执行完整转储期间,Database Migration Service 会连接到源实例,读取您选择迁移的数据库的内容,然后将数据加载到 Cloud SQL for PostgreSQL 目标实例。在此阶段,Database Migration Service 会捕获数据库的实际内容。
在完全转储阶段,Database Migration Service 可以打开与源数据库的多个连接,以提高性能。您可以在
创建迁移作业时配置并发连接数。
如需精细控制数据迁移,您也可以自行在 Database Migration Service 之外执行完整转储,并将数据加载到目标实例。如果您选择手动执行此阶段,迁移作业将从 CDC 阶段开始,并且 Database Migration Service 会要求您提供重做日志文件的系统变更编号 (SCN) 作为起始点。
变更数据捕获 (CDC)
当完全转储阶段结束时(或者如果您选择自行执行完全转储并从 CDC 阶段开始),Database Migration Service 会切换到 CDC 阶段,在此阶段中,它会持续监控源数据库中的更改,然后不断将这些更改复制到目标实例。在此阶段,Database Migration Service 不会从源数据库复制实际数据,而是读取日志文件以复制目标位置的更改。
Database Migration Service 使用 Oracle LogMiner API 来访问和解析源数据库中归档的 Oracle 重做日志文件。在您使用 Database Migration Service 将 Oracle 数据库迁移到 Cloud SQL for PostgreSQL 之前,我们建议您调整 Oracle 重做日志文件设置,以实现最佳性能和数据保真度。如需了解详情,请参阅
使用 Oracle 重做日志文件。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-08。"],[[["Database Migration Service utilizes two migration types, continuous and one-time, with only continuous migrations available for Oracle to Cloud SQL for PostgreSQL."],["Continuous migrations are divided into two phases: the full dump phase, which transfers the initial data to the destination, and the Change Data Capture (CDC) phase, which replicates subsequent changes."],["During the full dump phase, Database Migration Service copies data directly from the source database to the destination, with the option to adjust concurrent connection numbers for optimal performance."],["Alternatively, users can manually perform the full dump and then start the migration job with the CDC phase, providing the System Change Number (SCN) as the starting point."],["The CDC phase relies on monitoring log files to replicate changes, using the Oracle LogMiner API to read and parse archived Oracle redo log files for continuous data synchronization."]]],[]]