MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

ESSENTIALS: Home | Tips | Search | Categories | Top 10 | Products | Authors | Blogs | Forums | Webcasts | Advertise | About
SQL Server Database Guest User Account - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

SQL Server Database Guest User Account

Last post 04-11-2008 9:51 AM by admin. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-05-2007 12:00 AM

    SQL Server Database Guest User Account

    This post is related to this tip: SQL Server Database Guest User Account

    http://www.mssqltips.com/tip.asp?tip=1172

  • 04-11-2008 4:44 AM In reply to

    • tosc
    • Top 25 Contributor
    • Joined on 03-12-2008
    • Germany
    • Posts 11

    Re: SQL Server Database Guest User Account

    Hi,

    to explicit determine the guest user account I use your query as follow:

    EXEC sp_MSforeachdb 'USE [?];
    --IF THE DATABASE IS NOT A SYSTEM DATABASE
    IF DB_ID(''?'') > 4
    SELECT * FROM sys.sysusers WHERE name=''guest'';'
    GO
    CU
    tosc

    - http://www.insidesql.org
    - http://www.insidesql.org/blogs/tosc
  • 04-11-2008 9:51 AM In reply to

    Re: SQL Server Database Guest User Account

    Tosc,

    Yes - You are correct.  We also have this tip related to sp_MSForEachDB:

    http://www.mssqltips.com/tip.asp?tip=1414

    Thank you,
    The MSSQLTips.com Team

    Filed under:
Page 1 of 1 (3 items)