Inside a user database, I have two certificates, both are used for signing stored procedures

First cert was created long time ago by someone
Second I created myself for testing purposes

For second cert I also created database user from certificate

When I query sys.certificates, I can see column [sid]

For the second cert I can find this [sid] in the sys.database_principals and can see which database user second cert is mapped to (which is the user I created)

When I do the same for first cert (created by someone long time ago),
this cert's [sid] can't be found in the sys.database_principals

Question: how do I find out which database user first cert is mapped to ?

  • 1
    Perhaps the user created from the certificate has since been dropped. – Dan Guzman Feb 7 '20 at 19:52
  • 1
    Following @DanGuzman thought, if you happen to have an old backup of that database, you might be able to check if a user with that sid existed. – Ronaldo Feb 8 '20 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.