The server principal "sa" is not able to access the database "MyDb" under the current security context

5,920

It was the TRUSTWORTHY ON in the source DB then we had to run exec sp_changedbowner 'sa' to resolve the issue fully.

For future reference, 'Auto_Fix' does not work for db owners.

Share:
5,920

Related videos on Youtube

Nate Noonen
Author by

Nate Noonen

.NET Developer working at kCura http://kcura.com/corporate/careers

Updated on September 17, 2022

Comments

  • Nate Noonen
    Nate Noonen over 1 year

    We're getting this error and nothing we've tried so far has worked:

      TRUSTWORTHY ON
    
      exec sp_change_users_login 'Auto_Fix', 'sa'
    

    sa is mapped to user dbo and dbo is the database owner. Any help will be greatly appreciated as my Googling skills are at their wits end :)

    • my algorithm
      my algorithm about 13 years
      Can sa access other dbs in the same server from the same machine?