tencent cloud

TencentDB for SQL Server

Release Notes and Announcements
Release Notes
Product Announcements
User Guide
Product Introduction
Overview
Product Architecture
Strengths
Use Cases
Regions and AZs
Major Version Lifecycle Explanation
Features and Differences
Instance Types
Instance Specifications
Storage Types
Common Concepts
Network Environment
License Statement
Purchase Guide
Billing Overview
Product Pricing
Purchase Methods
Renewal Instructions
Payment Overdue
Refund
From Pay-as-You-Go to Monthly Subscription
Instance Adjustment Fees Description
Local Backup Space Billing
Cross-Region Backup Billing
Viewing Bill Details
Getting Started
Creating TencentDB for SQL Server Instance
Connecting to TencentDB for SQL Server Instance
Managing TencentDB for SQL Server Instance
Operation Guide
Constraints and Limits
Usage Specifications and Suggestions
Maintaining Instance
Adjusting Instance Configuration
Read-Only Instance
Network and Security
Account Management
Database Management
Data Security
Parameter Configuration
Monitoring and Alarms
Backup and Restoration 
Log Management
Publish-Subscribe
SSIS
Data Migration (New)
Data Migration (Legacy)
Data Synchronization (DTS) 
Practical Tutorial
TencentDB for SQL Server Methods for Regular Maintenance
TencentDB for SQL Server Optimization of Slow SQL
How to Better Use Tempdb
Cross-Account Backup Restoration
Creating VPC for TencentDB for SQL Server
Connecting Kingdee K/3 WISE to TencentDB for SQL Server
Account Permissions and Permission Control
Enabling and Disabling the CDC Feature
Shrinking a Database
API Documentation
History
Introduction
API Category
Making API Requests
Sales and fee related APIs
Instance Management related APIs
Operation and maintenance management related APIs
Network management related APIs
Account management related APIs
Database management related APIs
Security group management related APIs
Data security encryption related APIs
Parameter configuration related APIs
Extended Event related APIs
Log management related APIs
Read only instance management related APIs
Publish and subscribe related APIs
Backup related APIs
Rollback related APIs
Data migration (cold standby migration) related APIs
SQL Server Integration Services (SSIS) related APIs
Data migration (DTS old version) related APIs
Data Types
Error Codes
FAQs
Overview
Model Selection
Pricing and Selection
Connection and Network
Account and Permission
Backup and Rollback
Data Migration
Publish/Subscribe
Read-Only Instance
Version and Architecture Upgrade
Disk Space and Specification Adjustment
Monitoring and Alarms
Log-Related
Parameter Modification
Features
Performance, Space, and Memory-Related FAQs
Service Agreement
Service Level Agreement
Terms of Service
Performance Evaluation
Performance Test Report
Glossary
Contact Us

Managing Publish-Subscribe

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-09-09 12:03:20

Operation Scenarios

You can manage Publish/Subscribe via the SQL Server console, including creating, viewing, and deleting Publish/Subscribe tasks.
Note:
During the enabling period of the publish-subscribe feature, it is advisable to refrain from manipulating the data in the subscription database, as this may lead to inconsistencies in data synchronization.

Feature Limits

This feature is available only when the publishing instances and subscribing instances are TencentDB for SQL Server instances.
Only database-level publication and subscription are supported.
A read-only instance cannot serve as a publishing or subscribing server.
The publishing and subscribing instances must have the same version and situate in the same region, though they can be in different availability zones.
Data tables without a primary key cannot be subscribed to. The following code can be employed to examine whether the database to be published contains tables not equipped with a primary key.
use dbname
select name from sys.sysobjects where xtype='U' and id not in(select parent_obj from sys.sysobjects where xtype='PK')
When a database with the same name exists in both the publishing and subscribing instances, such a database cannot be subscribed to.
Once a Publish/Subscribe link is established, if a database in the link is deleted, the established Publish/Subscribe link will accordingly be deleted.
If either the publishing or subscribing instance is terminated, the corresponding Publish/Subscribe link will also be deleted.

Prerequisites

The SQL Server instances have been established. Ensure a minimum of two instances. For more information, refer to Creating SQL Server Instance.

The steps are as follows:

Establishing Publish-Subscribe Relationships

1. Log into the SQL Server console. In the instance list, click the Instance ID or Manage in the Operation column to access the instance management page.
2. On the instance management page, select the Publish/Subscribe tab and then click Create.

3. On the Set publishing and subscription instances page, enter the Publish/Subscribe Name, select the Subscribe Instance ID, and click Next.
Note:
A read-only instance cannot serve as a publishing or subscribing server.
The publishing and subscribing instances must have the same version and situate in the same region, though they can be in different availability zones.

4. On the Select pub/sub project page, select a pub/sub database (you can select multiple databases), then click Go Next and Confirm Configuration.
Note:
You can configure up to 80 databases to be published/subscribed to in each Publish/Subscribe operation by default.

5. On the Confirm pub/sub project page, confirm the configuration information for Publish/Subscribe, then click Complete and Start Configuration.

You can view the progress of the Pub/Sub Creation via Running Tasks in the upper right corner of the Publish/Subscribe page.


Viewing Publish/Subscribe Status

1. Log in to the TencentDB for SQL Server console, on the instance list, click the Instance ID of the publishing instances or the subscribing instances to access the instance management page.
2. On the instance management page, select the Publish/Subscribe tab to view the created Publish/Subscribe relationship. The key information includes the basic information of the publishing/subscribing instances, the statuses, and the last synchronization time.


Deleting Publish/Subscribe Relationships

1. Log in to the TencentDB for SQL Server console, on the instance list, click the Instance ID of the publishing instances or the subscribing instances to access the instance management page.
2. On the instance management page, select the Publish/Subscribe tab, select the required publishing/subscribing instances, and click Delete. You can also delete the instances in batches.
Note:
Once a Publish/Subscribe link is established, if a database in the link is deleted, the established Publish/Subscribe link will accordingly be deleted.
If either the publishing or subscribing instance is terminated, the corresponding Publish/Subscribe link will also be deleted.

Related APIs

API
Description
This API is used to create a publish/subscribe relationship between two databases.
This API is used to modify the publish/subscribe names.
This API is used to query the publish/subscribe relationship list.
This API is used to delete the publish/subscribe relationship between two databases.
This API is used to modify the publish/subscribe relationship of the instance.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백