- Newest
- Most votes
- Most comments
When using MS-REPLICATION with AWS DMS for ongoing replication from a SQL Server source, removing articles (tables) from the publication can be challenging due to the unique way AWS DMS sets up replication.
The error you're encountering suggests that while you can see the article in the DMS-created publication, the standard SQL Server stored procedure sp_droparticle is not recognizing it. This is likely because AWS DMS configures replication differently than a typical SQL Server replication setup.
Unfortunately, there isn't a straightforward scripted method to remove articles from AWS DMS publications using standard SQL Server procedures. AWS DMS manages these publications internally, and they don't behave exactly like traditional SQL Server publications.
To rename a table that's part of an AWS DMS replication task, you'll need to take a different approach:
- Stop the AWS DMS replication task.
- Remove the table from the task's table mappings.
- Rename the table in your source database.
- Update the task's table mappings to include the renamed table.
- Restart the replication task.
This process ensures that AWS DMS reconfigures its internal replication setup to accommodate the renamed table. While it's not as straightforward as using sp_droparticle, it allows you to achieve your goal of renaming tables without conflicts with the AWS DMS replication process.
Keep in mind that this approach may require you to resynchronize data for the renamed table, depending on your specific DMS task configuration and requirements.
Sources
Capturing data changes for ongoing replication from SQL Server - AWS Database Migration Service
Step 2: Configure Your Microsoft SQL Server Source Database - Database Migration Guide
