sys.sp_mshasdbaccess
general #stored-procedure
Description
Lists the name and owner of all the databases to which the user has access. Execute permission is granted to the sys.sysdatabases (Transact-SQL)
Syntax
sp_
MS hasdbaccess
[ ; ]
Permissions
06/23/2025 syntaxsql None. (success) or (failure). Execute permission is granted to the role. sys.sysdatabases (Transact-SQL)