Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

guest user account in sql server

Posted on 2009-04-06
2
Medium Priority
?
321 Views
Last Modified: 2012-05-06
I wonder how this "guest" user exist in the db, I never create it, will this guest user available to veery db that we created?
0
Comment
Question by:motioneye
2 Comments
 
LVL 7

Expert Comment

by:luani
ID: 24075183
Yes,
Every new database is a restore of the model database, if dont want the user to be in every database remove from the model database.


0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 2000 total points
ID: 24075270
The guest user account is in both SQL Server 2000 and 2005 and it has been around since the SQL Server 6.5 days and probably earlier.  
This user account is used by SQL Server to access objects across databases if explicit rights are not granted.  
This account is relied on for some SQL Server 2000 system functions (master and tempdb) and needs to be maintained for SQL Server to function properly.  
Unfortunately, in some respects the guest user account can be a considered a threat from an application perspective that can be resolved in user defined databases.

To revoke access of guest user account:

SQL Server 2000

USE <Database Name>
GO
EXEC sp_revokedbaccess 'guest'
GO

SQL Server 2005

USE <Database Name>
GO
REVOKE CONNECT FROM GUEST
GO
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question