What can be done, if anything, when the special guest user is orphaned (not linked to any login)?
For one of my databases (SQL Server 2005), executing the following lists the guest user as an orphaned user.
exec sp_change_users_login 'report'
Results:
UserName UserSID
guest 0x3C2E66759FFBC14F84127D6795C27FD3
If I try to fix the guest user using that procedure, I get the following:
exec sp_change_users_login 'update_one', 'guest', 'guest'
Terminating this procedure. 'guest' is a forbidden value for the login name parameter in this procedure.
If I try to delete the user, I get:
User 'guest' cannot be dropped, it can only be disabled.
select * from sys.database_principals where name = 'guest'
Results in:
name guest
principal_id 2
type S
type_desc SQL_USER
default_schema_name guest
create_date 11/13/98 2:58 AM
modify_date 10/16/01 4:31 PM
owning_principal_id NULL
sid 0x3C2E66759FFBC14F84127D6795C27FD3
is_fixed_role 0
The database seems to be confused as to whether this is a special user or not. Is there anything that can be done?
0x3C2E66759FFBC14F84127D6795C27FD3instead of0x00– JustinStolle Jun 4 '12 at 21:52Terminating this procedure. 'guest' is a forbidden value for the login name parameter in this procedure.– JustinStolle Jun 4 '12 at 22:03guesthappened to get into this state, but noticed it in doing some db maintenance. It may not be important enough to worry about, but would be curious to know if there's an answer. – JustinStolle Jun 5 '12 at 0:00