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.

Stanley Johns's Database Blog

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.

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s