Renamed sa causing problem during replication distribution setup

In a previous post, I mentioned that it may be a good security practice to rename sa to something else.

However, if you did that and later on decided to make the server a distributor in replication, you will get the error message below:

Cannot find the principal ‘sa’, because it does not exist or you do not have permission.
‘distribution’ is not configured as a distribution database.
Changed database context to ‘master’. (Microsoft SQL Server, Error: 15151)

Solution: rename it back to sa, proceed with replication distribution setup, then rename sa to something else.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.