Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Database User Disabled

Author  Topic 

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-03-26 : 17:53:08
I have a set of Users (not Logins) in the MSDB database that, in SSMS, have the red down arrow in their icon. They act as if they are disabled. I was able to resolve the issue by dropping and re-creating the User. Since I was unaware that a User could be disabled, I'd like to know what mechanism could be used to disable or enable them.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)

Peter99
Constraint Violating Yak Guru

498 Posts

Posted - 2011-03-27 : 18:38:29
alter user <username> disable

and

alter user <username> enable
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-03-28 : 15:24:07
I don't find this syntax in BOL and when I run the script I receive this message:

alter user GenericUser disable;

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'disable'.

My larger question is what could have come along and placed my Users into a disabled state? The Users are created from a script which is run on a series of servers and databases (all are SQL 2008). Only one server/database combination had an issue. The same script, eventually, was used to create the working Users, though I did need to manually run each User script individually before I found joy.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-28 : 19:49:21
Hmmm, I thought you could only do that at the login level.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2011-03-29 : 11:07:54
Precisely...and well put. I've never heard of disabled/enabled Users and can find nothing to support the concept...except that I saw it happen. Since the symptom is resolved, I might just chalk this up to gamma rays, sun spots and a brilliant example of Chaos Theory.

=======================================
Elitism is the slur directed at merit by mediocrity. -Sydney J. Harris, journalist (1917-1986)
Go to Top of Page
   

- Advertisement -