The error occurs when i want to execute the following statement:
EXEC sys.sp_cdc_enable_db
It returns this error:
Could not update the metadata that indicates database AdventureWorks2008R2 is enabled for Change Data Capture. The failure occurred when executing the command 'SetCDCTracked(Value = 1)'. The error returned was 15517: 'Cannot execute as the database principal because the principal "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.'. Use the action and error to determine the cause of the failure and resubmit the request.
Solution
Execute the following statements:
USE AdventureWorks2008R2
GO
EXEC sp_changedbowner 'sa'
and the database owner changes to sa
link