Tag Archives: logins

How to disable guest user in SQL Server database

Sometimes it may be necessary for you to turn off guest account on particular DB, so that it depicted witd red arrow directed downwards. From your experience with Windows accounts you quite naturally expect to find “Disable” option in account context menu but looks like this is not a SQL way – as there is no such option (at least in SQL Server Management Studio 2008 R2 SP1).\n\nBut you may disable guest user with following SQL command:\n\nREVOKE CONNECT FROM guest\n\nAnd in case you need to “enable” it back, use following:\n\nGRANT CONNECT TO guest

Please follow and like us: