Over the last few (work) days I have been having problems getting CDC (Change Data Capture) to work. After looking in the SQL Server Agent job history and finding the error “Cannot find the principal ‘dbo’, because it does not exist or you do not have permission” a colleague suggested changing the db owner to “sa”. As soon as I did that everything (CDC related) sprung into life, without me even needed to restart the SQL Server Agent windows service.
There are times when a DB is created and the dbo user is mapped to another user name like ‘mike’, instead of being mapped to the sa login. Usually, sp_change_users_login can be used to change the logins of a DB user, but this SP cannot be used for dbo users. This is when sp_changedbowner will have to be used. Execute sp_changedbowner ‘sa’, and now your dbo DB user will be mapped to the sa login.