Search notes:

SQL Server: asymmetric keys

Mapped logins

An asymmetric key can have a login, that is mapped to it:
create login … from asymmetric key …;
An asymmetric key in sys.asymmetric_keys can be joined to the mapped login in sys.server_principals on the sid value:
select
   p.name      login_name,
   p.type_desc           ,  -- ASYMMETRIC_KEY_MAPPED_LOGIN
   a.name      key_name  ,
   a.algorithm_desc      ,
   a.key_length
from
   sys.asymmetric_keys   a                   join
   sys.server_principals p on a.sid = p.sid
If a mapped login exists for an asymmetric key, the asymmetric key cannot be dropped.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740452731, '18.225.209.24', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/administration/security/keys/asymmetric(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78