Quantcast
Channel: SQL Server DBA
Viewing all articles
Browse latest Browse all 80

How to detect if the guest account is disabled

$
0
0

A common  SQL Server Security check is to identify if the  guest id is enabled.     By default  , the SQL Server  guest id is disabled , but for various reasons it can become enabled. 

To identify the guest status you can either use the SQL Server Management Studio (SSMS) or through SQL code. 

Check for guest status through SSMS

Guest

Check guest status through sql code 

 

SELECT name, hasdbaccess
FROM sys.sysusers
WHERE name = 'guest'

To change the guest status 

 

GRANT CONNECT TO guest 
REVOKE CONNECT FROM guest

Read more on SQL Security 

How to check the SQL sa Login is disabled

5 easy ways to protect SQL Server against Ransomware attacks

Find Weak passwords in SQL Server


Viewing all articles
Browse latest Browse all 80

Trending Articles