[hotfix] Fix sqlserver monitor same table in other database (#2335)
* [hotfix] Fix sqlserver monitor same table in other database * Add unit test --------- Co-authored-by: gongzhongqiang <gongzhongqiang@gigacloudtech.com>pull/2787/head
parent
6dba62ece2
commit
823f5a1e21
@ -0,0 +1,30 @@
|
||||
-- Copyright 2023 Ververica Inc.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
-- Unless required by applicable law or agreed to in writing,
|
||||
-- software distributed under the License is distributed on an
|
||||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
-- KIND, either express or implied. See the License for the
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
-- ----------------------------------------------------------------------------------------------------------------
|
||||
-- DATABASE: product
|
||||
-- ----------------------------------------------------------------------------------------------------------------
|
||||
-- Create the product database
|
||||
CREATE DATABASE product;
|
||||
|
||||
USE product;
|
||||
EXEC sys.sp_cdc_enable_db;
|
||||
|
||||
CREATE TABLE products (
|
||||
id INTEGER IDENTITY(1001,1) NOT NULL PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
description VARCHAR(512),
|
||||
weight FLOAT
|
||||
);
|
||||
insert into products(name,description,weight)values ('scooter','Small 2-wheel scooter',99.8);
|
||||
EXEC sys.sp_cdc_enable_table @source_schema = 'dbo', @source_name = 'products', @role_name = NULL, @supports_net_changes = 0;
|
Loading…
Reference in New Issue