Monday, February 20, 2012

issqluser: how is it set/unset

I can find no information anywhere on the Internet concerning what the issqluser column in the sysusers table actually means or how it is set/unset. sp_dropuser and sp_revokedbaccess appear to drop the user completely from the sysusers table in the target database.
What are the mechanisms that can cause the issqluser to be set to 0? I know I can drop and recreate the user, but I have a customer who somehow got the value set to zero, and I'm trying to find out how to avoid the problem or fix it in-place in the future.

There are 2 types of user accounts SQL users and Windows users. The latter is required to use trusted connection where a users connection to the SQL server is based on the account they logged into their machine.

The former SQL accounts should only be used where Windows accounts can't be.

The difference between the two are that SQL accounts are defined in the SQL server including the username and password, a windows account is defined outside of SQL server and you allow the windows account access to the SQL server.

In SQL 2000 sp_addlogin and sp_droplogin are used fo SQL accounts, sp_grantlogin and sp_revokelogin are used for windows accounts.

In SQL 2005 you use CREATE LOGIN and DROP LOGIN for both

sysusers is a system table thus the reason for the lack of documentation. I guess a 0 suggests the account is a windows account.

|||Got it. Thanks!

No comments:

Post a Comment