Search notes:

SQL Server function: is_member

is_member checks if the current user is member of a Windows group or a SQL Server database role. It returns 0, 1 or null.
Checking for membership in a Windows group.
select is_member('DOMN\GRP')
select is_member('NT AUTHORITY\SYSTEM')
Checking for membership in a database role:
select is_member('db_datawriter')
The following returns null because sysadmin is a server role, not a database role:
select is_member('sysadmin')

See also

is_srvrolemember()

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...', 1759375207, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/T-SQL/functions/security/is_member(49): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78