Export (0) Print
Expand All

guest User

SQL Server 2000

  New Information - SQL Server 2000 SP3.

The guest user account allows a login without a user account to access a database. A login assumes the identity of the guest user when both of the following conditions are met:

  • The login has access to an instance of Microsoft® SQL Server™ but does not have access to the database through his or her own user account.

  • The database contains a guest user account.

Permissions can be applied to the guest user as if it were any other user account. The guest user can be deleted and added to all databases except master and tempdb, where it must always exist. By default, a guest user account does not exist in newly created databases.

Avoid using the guest account; all logins without their own database permissions obtain the database permissions granted to this account. If you must use the guest account, grant minimum permissions.

For example, to add a guest user account to a database named Accounts, run the following code in SQL Query Analyzer:

USE Accounts
GO
EXECUTE sp_grantdbaccess guest

To grant a SQL Server login access to a database

Transact-SQL

Enterprise Manager

SQL-DMO

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft