Troubleshooting Guide: Error 3763 – Object In Use by Change Feed
Why This Error Happens
Error 3763 occurs when an attempt is made to drop, alter, or truncate a table (or database) that is currently enabled for Change Feed, a feature introduced in SQL Server 2025 that continuously streams row-level changes to downstream consumers. SQL Server blocks the operation because Change Feed maintains internal tracking metadata and system objects tied to the table, and modifying the schema or data structure while this tracking is active would corrupt the change stream. This typically happens when administrators forget to disable Change Feed before performing maintenance, migrations, or schema changes.
Step-by-Step Resolution Guide
Step 1: Identify Which Objects Have Change Feed Enabled
- Run the following query to list all tables with active Change Feed tracking:
SELECT name, object_id, is_change_feed_enabled FROM sys.tables WHERE is_change_feed_enabled = 1;- Note the exact table name referenced in the error message (
%.*lsplaceholder). - Confirm whether the feed is still actively consumed by a downstream application (Event Hubs, Kafka connector, or Fabric pipeline).
Step 2: Disable Change Feed on the Target Object
- Open SQL Server Management Studio (SSMS) 21 or Azure Data Studio connected to your SQL Server 2025 instance.
- Execute the following command to disable Change Feed before altering the table:
ALTER TABLE dbo.YourTableName DISABLE CHANGE_FEED;- If the error references a database-level feed, disable it at the database scope instead:
ALTER DATABASE YourDatabase SET CHANGE_FEED = OFF;
Step 3: Perform the Required Schema or Maintenance Operation
- Once Change Feed is disabled, retry the original operation (DROP, TRUNCATE, or ALTER).
- Example:
TRUNCATE TABLE dbo.YourTableName; - If working in Windows Server 2025, ensure no other service (like SQL Server Agent jobs) is re-enabling Change Feed concurrently via scheduled scripts.
Step 4: Re-enable Change Feed (If Required)
- If downstream consumers still require the feed, re-enable it after maintenance completes:
ALTER TABLE dbo.YourTableName ENABLE CHANGE_FEED;- Validate that any associated service broker queues or streaming endpoints reconnect successfully.
Alternative or Verification Steps
- Verify the fix by re-running the
sys.tablesquery from Step 1 —is_change_feed_enabledshould reflect the correct state (0 or 1) and the original DDL command should execute without Error 3763. - If disabling Change Feed is not permitted due to governance policies, use
sp_change_feed_pause(new in SQL Server 2025) to temporarily suspend tracking instead of fully disabling it, then resume withsp_change_feed_resumeafter the operation completes.