When I try to install tSQLt onto an existing database i get the following error:
The database owner SID recorded in the master database differs from
the database owner SID recorded in database ”. You should correct
this situation by resetting the owner of database ” using the ALTER
AUTHORIZATION statement.
This problem can arise when a database restored from a backup and the SID of the database owner does not match the owners SID listed in the master database. Here is a solution that uses the “ALTER AUTHORIZATION” statement recommended in the error message: