Wednesday, April 30, 2014

Could not update the metadata that indicates database is enabled for Change Data Capture.

Today, I came across below error when I was trying to enable CDC for database. I used below query to enable CDC on database.
Query:
Use Asif
Go

EXEC
sys.sp_cdc_enable_db
Go

Error:
Could not update the metadata that indicates database is enabled for Change Data Capture.

The failure occurred when executing the command 'SetCDCTracked(Value = 1)'. The error returned was 15404: 'Could not obtain information about Windows NT group/user , error code 0x5.'. Use the action and error to determine the cause of the failure and resubmit the request.

Fix:
I fixed it by changing database owner from my user to sa. Below is query to change db owner to sa.
Query:
Use Asif
Go

EXEC sp_changedbowner 'sa'
Go

1 comment: