You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/relational-databases/system-dynamic-management-views/change-data-capture-sys-dm-cdc-log-scan-sessions.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,10 @@ dev_langs:
49
49
|**failed_sessions_count**|**int**|Number of sessions that failed.|
50
50
51
51
## Remarks
52
-
The values in this dynamic management view are reset whenever the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is started.
52
+
53
+
The `sys.dm_cdc_log_scan_sessions` can contain up to 32 scan sessions and an aggregate of all the scan sessions with `session_id= 0`. So, at any given time, this dynamic management view can contain a maximum of 33 rows.
54
+
55
+
The values in this dynamic management view are reset whenever the instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is restarted or a failover (local & GeoDR) occurs.
53
56
54
57
## Permissions
55
58
Requires VIEW DATABASE STATE permission to query the `sys.dm_cdc_log_scan_sessions` dynamic management view. For more information about permissions on dynamic management views, see [Dynamic Management Views and Functions (Transact-SQL)](~/relational-databases/system-dynamic-management-views/system-dynamic-management-views.md).
Copy file name to clipboardExpand all lines: docs/relational-databases/track-changes/about-change-data-capture-sql-server.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,22 @@ CREATE TABLE T1(
192
192
193
193
Sysadmin permissions are required to enable change data capture for SQL Server or Azure SQL Managed Instance. The db_owner role is required to enable change data capture for Azure SQL Database.
194
194
195
+
## General guidelines
196
+
197
+
For Change data capture (CDC) to function properly, you shouldn't modify any CDC metadata such as CDC schema, CDC system stored procedures, default `cdc` user permissions ([`sys.database_principals`](../system-catalog-views/sys-database-principals-transact-sql.md)) or rename `cdc` user.
198
+
199
+
Any objects in [sys.objects](../system-catalog-views/sys-objects-transact-sql.md) with `is_ms_shipped` property set to `1` shouldn't be modified.
200
+
201
+
```sql
202
+
SELECT name AS object_name
203
+
,SCHEMA_NAME(schema_id) AS schema_name
204
+
,type_desc
205
+
,is_ms_shipped
206
+
FROMsys.objects
207
+
WHERE is_ms_shipped=1
208
+
209
+
```
210
+
195
211
## Limitations
196
212
197
213
Change data capture has the following limitations:
@@ -217,10 +233,10 @@ Configuring the frequency of the capture and the cleanup processes for CDC in Az
217
233
CDC does not support the values for computed columns even if the computed column is defined as persisted. Computed columns that are included in a capture instance always have a value of `NULL`. This behavior is intended, and not a bug.
218
234
219
235
**Point-in-time restore (PITR)**
220
-
If you enable CDC on your database as an Microsoft Azure Active Directory (Azure AD) user, it is not possible to Point-in-time restore (PITR) to a sub-core SLO. It is recommended that you restore the database to the same as the source or higher SLO, and then disable CDC if necessary.
236
+
If you enable CDC on your database as a Microsoft Azure Active Directory (Azure AD) user, it is not possible to Point-in-time restore (PITR) to a sub-core SLO. It is recommended that you restore the database to the same as the source or higher SLO, and then disable CDC if necessary.
221
237
222
238
**Microsoft Azure Active Directory (Azure AD)**
223
-
If you create a database in Azure SQL Database as an Microsoft Azure Active Directory (Azure AD) user and enable change data capture (CDC) on it, a SQL user (for example, even sysadmin role) won't be able to disable/make changes to CDC artifacts. However, another Azure AD user will be able to enable/disable CDC on the same database.
239
+
If you create a database in Azure SQL Database as a Microsoft Azure Active Directory (Azure AD) user and enable change data capture (CDC) on it, a SQL user (for example, even sysadmin role) won't be able to disable/make changes to CDC artifacts. However, another Azure AD user will be able to enable/disable CDC on the same database.
224
240
225
241
Similarly, if you create an Azure SQL Database as a SQL user, enabling/disabling change data capture as an Azure AD user won't work.
0 commit comments