Nội dung
Bây giờ bạn sẽ mô phỏng một giao dịch với cơ sở dữ liệu nguồn bằng cách cập nhật bảng sport_type. Database Migration Service sẽ tự động phát hiện và sao chép những thay đổi này sang cơ sở dữ liệu đích.
Parameter | Value |
---|---|
Task identifier | oracle-replication-task |
Replication instance | oracle-replication |
Source database endpoint | oracle-source |
Target database endpoint | aurora-target |
Migration type | Replicate data changes only |
CDC stop mode | Don’t use custom CDC stop mode |
Target table preparation mode | Do nothing |
Stop task after full load completes | Don’t stop |
Include LOB columns in replication | Limited LOB mode |
Max LOB size (KB) | 32 |
Enable validation | Unchecked |
Enable CloudWatch logs | Checked |
Bây giờ bạn sẽ mô phỏng một thay đổi với cơ sở dữ liệu nguồn bằng cách cập nhật bảng sport_type
. Database Migration Service sẽ tự động phát hiện và sao chép những thay đổi này vào cơ sở dữ liệu đích.
sport_type
:INSERT ALL
INTO dms_sample.sport_type (name,description) VALUES ('hockey', 'A sport in which two teams play against each other by trying to more a puck into the opponents goal using a hockey stick')
INTO dms_sample.sport_type (name,description) VALUES ('basketball', 'A sport in which two teams of five players each that oppose one another shoot a basketball through the defenders hoop')
INTO dms_sample.sport_type (name,description) VALUES ('soccer','A sport played with a spherical ball between two teams of eleven players')
INTO dms_sample.sport_type (name,description) VALUES ('volleyball','two teams of six players are separated by a net and each team tries to score by grounding a ball on the others court')
INTO dms_sample.sport_type (name,description) VALUES ('cricket','A bat-and-ball game between two teams of eleven players on a field with a wicket at each end')
SELECT * FROM dual;
COMMIT;
SELECT * FROM dms_sample.sport_type;
sport_type
ở CSDL đích.Các bản ghi mới mà bạn đã thêm vào bảng sports_type
là basketball, cricket, hockey, soccer, volleyball ở cơ sở dữ liệu nguồn đã được sao chép sang cơ sở dữ liệu đích dms_sample
của bạn. Bạn có thể điều tra thêm về số lần chèn, xóa, cập nhật và DDL bằng cách xem Table statistics của Database migration tasks của bạn trong AWS console.
AWS DMS task giữ cho cơ sở dữ liệu Aurora PostgreSQL đích được cập nhật với các thay đổi cơ sở dữ liệu nguồn. AWS DMS luôn cập nhật tất cả các bảng trong task cho đến khi chúng ta thực hiện di chuyển ứng dụng. Độ trễ gần bằng 0.