Troubleshooting Guide: SQL Server Error 3735 – Primary Key Constraint Cannot Be Dropped
Why This Error Happens
This error occurs because the table has Change Tracking enabled, which has a hard dependency on the primary key constraint to track row-level changes (INSERT, UPDATE, DELETE) via the key values. SQL Server 2025 blocks the ALTER TABLE ... DROP CONSTRAINT operation to prevent an orphaned change tracking configuration that would have no way to identify rows. This is a protective mechanism, not a corruption or permissions issue—it is purely a sequencing/dependency violation in the DDL operation order.
Step-by-Step Resolution Guide
Step 1: Identify Which Tables Have Change Tracking Enabled
- Run the following query to confirm change tracking status on the target table:
SELECT t.name AS TableName, ct.is_track_columns_updated_on
FROM sys.change_tracking_tables ct
JOIN sys.tables t ON ct.object_id = t.object_id
WHERE t.name = 'YourTableName';
- If a row is returned, change tracking is active and is the direct cause of Error 3735.
Step 2: Disable Change Tracking on the Table
- Execute the following T-SQL command in SQL Server Management Studio (SSMS) or Azure Data Studio, scoped to the correct database context:
USE YourDatabaseName;
GO
ALTER TABLE dbo.YourTableName DISABLE CHANGE_TRACKING;
- Ensure you are running this with
db_ownerorALTERpermissions on the table. - If change tracking is enabled at the database level only (not table level), you may also need to check
sys.change_tracking_databases.
Step 3: Drop the Primary Key Constraint
- Once change tracking is disabled, retry the original operation:
ALTER TABLE dbo.YourTableName DROP CONSTRAINT PK_YourTableName;
- This should now complete without raising Error 3735.
Step 4: Re-enable Change Tracking (If Required)
- If your application logic depends on change tracking, re-create the primary key first, then re-enable tracking:
ALTER TABLE dbo.YourTableName ADD CONSTRAINT PK_YourTableName PRIMARY KEY (YourColumn);
GO
ALTER TABLE dbo.YourTableName ENABLE CHANGE_TRACKING;
- Confirm the new primary key column(s) align with your application’s change tracking consumer logic (e.g., CDC clients, sync frameworks).
Alternative or Verification Steps
- Verify the fix by re-running the
sys.change_tracking_tablesquery from Step 1 — it should return no rows if tracking was successfully disabled, or return the new configuration if re-enabled. - If you cannot disable change tracking due to active application dependencies (e.g., Azure Mobile Apps sync), consider scheduling the constraint change during a maintenance window and temporarily pausing sync clients to avoid data loss.