0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Azure SQL Database に対して Microsoft SQL Server CDC Source V2 (Debezium) コネクタを設定する際の CDC schema に接続できないというエラーへの対応方法

Posted at

概要

Azure SQL Database に対して Microsoft SQL Server CDC Source V2 (Debezium) コネクタを設定する際に、下記のエラーへの対応方法を共有します。Azure SQL Database にて CDC を有効にしたテーブルを作成する必要があるようです。エラーの再現方法と対応方法を共有します。

User debezium does not have access to CDC schema in the following databases: debezium_00. This user can only be used in initial_only snapshot mode

image.png

エラーの再現方法

1. Azure SQL Database にて CDC を有効化

EXEC sys.sp_cdc_enable_db;
SELECT name, is_cdc_enabled
FROM sys.databases  
WHERE name = 'debezium_00';

image.png

2. Add Microsoft SQL Server CDC Source V2 (Debezium) connector

image.png

3. Add Microsoft SQL Server CDC Source V2 (Debezium) connectorのステップでエラーとなることを確認

User debezium does not have access to CDC schema in the following databases: debezium_00. This user can only be used in initial_only snapshot mode

image.png

エラーへの対応方法

1. Azure SQL Database にて CDC を有効にしたテーブルを作成

IF OBJECT_ID(N'dbo.test_01', N'U') IS NOT NULL
    DROP TABLE [dbo].[test_01];
GO
CREATE TABLE [dbo].[test_01] (
    [Id] INT NOT NULL,
    CONSTRAINT [PK_Customers] PRIMARY KEY ([Id])
);
GO
EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name = N'test_01',
    @role_name = NULL;

image.png

2. Confluent にてContinueを選択して次の画面に進むことを確認

image.png

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?