• This will show errors for "Cannot change owner..." as mentioned above for the master, model, tempdb, and distribution databases, but it will run and successfully update all other databases despite the error. If you want to code around it to avoid the errors, or logically only update the databases that aren't already 'sa' you can do so.

    EXEC sp_MSforeachdb

    '

    EXEC [?].[dbo].sp_changedbowner @loginame = N''sa'', @map = ''false''

    '