Skip to content

Latest commit

 

History

History
106 lines (77 loc) · 4.32 KB

sp-change-feed-enable-db.md

File metadata and controls

106 lines (77 loc) · 4.32 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.sp_change_feed_enable_db (Transact-SQL)
The sys.sp_change_feed_enable_db system stored procedure enables the current database for Azure Synapse Link or Fabric Mirrored Database publishing.
WilliamDAssafMSFT
wiassaf
imotiwala, randolphwest
08/21/2024
fabric
system-objects
reference
sys.sp_change_feed_enable_db_TSQL
sys.sp_change_feed_enable_db
sp_change_feed_enable_db_TSQL
sp_change_feed_enable_db
sp_change_feed_enable_db
TSQL
>=sql-server-ver16 || =azuresqldb-current || =fabric || =azure-sqldw-latest

sys.sp_change_feed_enable_db (Transact-SQL)

[!INCLUDE sqlserver2022-asdb-asa-fabric]

Enables current database for Azure Synapse Link for SQL or Fabric mirrored databases.

Note

This system stored procedure is used internally and isn't recommended for direct administrative use. Use Synapse Studio or the Fabric portal instead. Using this procedure could introduce inconsistency.

Syntax

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

EXECUTE sys.sp_change_feed_enable_db
    [ [ @maxtrans ] ]
    [ , [ @pollinterval ]  ]
    [ , [ @destination_type ] ]
GO

Arguments

@maxtrans

Data type is int. Indicates the maximum number of transactions to process in each scan cycle.

  • For Azure Synapse Link, the default value if not specified is 10000. If specified, the value must be a positive integer.
  • For Fabric mirroring, this value is dynamically determined and automatically set.

@pollinterval

Data type is int. Describes the frequency, or polling interval, that the log is scanned for any new changes in seconds.

  • For Azure Synapse Link, the default interval if not specified is 5 seconds. The value must be 5 or larger.
  • For Fabric mirroring, this value is dynamically determined and automatically set.

@destination_type

Applies to: Fabric database mirroring only. For Synapse Link, do not specify.

Data type is int. Default is 0, for Azure Synapse Link. 2 = Fabric database mirroring.

Permissions

A user with CONTROL database permissions, db_owner database role membership, or sysadmin server role membership can execute this procedure.

Examples

The following sample enables the change feed.

EXECUTE sys.sp_change_feed_enable_db;

Verify the database is enabled.

SELECT
    [name]
  , is_data_lake_replication_enabled
FROM sys.databases;

Related content

For Microsoft Fabric mirrored databases:

For Azure Synapse Link: