{
  "schema_version": 2,
  "id": "integrate/redis-data-integration/data-pipelines/prepare-dbs/aws-aurora-rds/aws-rds-sqlserver",
  "title": "Prepare Microsoft SQL Server on AWS RDS for RDI",
  "url": "https://redis.io/docs/latest/integrate/redis-data-integration/1.19.1/data-pipelines/prepare-dbs/aws-aurora-rds/aws-rds-sqlserver/",
  "summary": "Enable CDC features in your source databases",
  "content": "\nFollow the steps in the sections below to prepare a [Microsoft SQL Server on AWS RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.SQLServer.html) database to work with RDI.\n\n\u003e [!NOTE]\n\u003e Change Data Capture (CDC) is not supported on SQL Server Express Edition. Only the Standard, Enterprise, and Developer editions support CDC and are supported by RDI.\n\n```checklist {id=\"rds-sqlserver-list\" nointeractive=\"true\" }\n- [ ] [Create the Debezium user](#create-the-debezium-user)\n- [ ] [Enable CDC on the database](#enable-cdc-on-the-database)\n```\n\n## Create the Debezium user\n\nThe Debezium connector needs a user account to connect to SQL Server. This\nuser must have appropriate permissions on all databases where you want Debezium\nto capture changes.\n\n```checklist {id=\"rds-sqlserver-create-debezium-user\" nointeractive=\"true\" }\n- [ ] [Connect to SQL Server as an admin user](#connect-to-sql-server-as-an-admin-user)\n- [ ] [Grant the user the necessary permissions](#grant-the-user-the-necessary-permissions)\n```\n\n1. \u003ca id=\"connect-to-sql-server-as-an-admin-user\"\u003e\u003c/a\u003e\n    Connect to your database as an admin user and create a new user for the connector:\n\n    ```sql\n    USE master\n    GO\n    CREATE LOGIN \u003cusername\u003e WITH PASSWORD = '\u003cpassword\u003e'\n    GO\n    USE \u003cdatabase\u003e\n    GO\n    CREATE USER \u003cusername\u003e FOR LOGIN \u003cusername\u003e\n    GO\n    ```\n\n    Replace `\u003cusername\u003e` and `\u003cpassword\u003e` with a username and password for the new user and replace `\u003cdatabase\u003e` with the name of your database.\n\n1. \u003ca id=\"grant-the-user-the-necessary-permissions\"\u003e\u003c/a\u003e\n    Grant the user the necessary permissions:\n\n    ```sql\n    USE master\n    GO\n    GRANT VIEW SERVER STATE TO \u003cusername\u003e\n    GO\n    USE \u003cdatabase\u003e\n    GO\n    EXEC sp_addrolemember N'db_datareader', N'\u003cusername\u003e'\n    GO\n    ```\n\n    Replace `\u003cusername\u003e` with the username of the Debezium user and replace `\u003cdatabase\u003e` with the name of your database.\n\n## Enable CDC on the database\n\nChange Data Capture (CDC) must be enabled for the database and for each table you want to capture.\n\n```checklist {id=\"rds-sqlserver-enable-cdc\" nointeractive=\"true\" }\n- [ ] [Enable CDC for the database](#enable-cdc-for-the-database)\n- [ ] [Enable CDC for each table you want to capture](#enable-cdc-for-each-table-you-want-to-capture)\n- [ ] [Add the Debezium user to the CDC role](#add-the-debezium-user-to-the-cdc-role)\n```\n\n1. \u003ca id=\"enable-cdc-for-the-database\"\u003e\u003c/a\u003e\n    Enable CDC for the database by running the following command:\n\n    ```sql\n    EXEC msdb.dbo.rds_cdc_enable_db '\u003cdatabase\u003e'\n    GO\n    ```\n\n    Replace `\u003cdatabase\u003e` with the name of your database.\n\n1. \u003ca id=\"enable-cdc-for-each-table-you-want-to-capture\"\u003e\u003c/a\u003e\n    Enable CDC for each table you want to capture by running the following commands:\n\n    ```sql\n    USE \u003cdatabase\u003e\n    GO\n    EXEC sys.sp_cdc_enable_table\n    @source_schema = N'\u003cschema\u003e',\n    @source_name   = N'\u003ctable\u003e', \n    @role_name     = N'\u003crole\u003e',\n    @supports_net_changes = 0\n    GO\n    ```\n\n    Replace `\u003cdatabase\u003e` with the name of your database, `\u003cschema\u003e` with the name of the schema containing the table, `\u003ctable\u003e` with the name of the table, and `\u003crole\u003e` with the name of a new role that will be created to manage access to the CDC data. \n\n    \u003e [!NOTE]\n    \u003e The value for `@role_name` can’t be a fixed database role, such as `db_datareader`. \n    \u003e Specifying a new name will create a corresponding database role that has full access to the\n    \u003e captured change data.\n\n1. \u003ca id=\"add-the-debezium-user-to-the-cdc-role\"\u003e\u003c/a\u003e\n    Add the Debezium user to the CDC role:\n\n    ```sql\n    USE \u003cdatabase\u003e\n    GO\n    EXEC sp_addrolemember N'\u003crole\u003e', N'\u003cusername\u003e'\n    GO\n    ```\n\n    Replace `\u003crole\u003e` with the name of the role you created in the previous step and replace `\u003cusername\u003e` with the username of the Debezium user.\n",
  "tags": ["docs","integrate","rs","rdi"],
  "last_updated": "2026-09-19T17:55:58-07:00"
}
