February 12, 2009 at 9:09 am
Hi all,
Pleas help me, I'm very new in Sql. I have DBO access and want to check the user account is disable or enable by use the GUI and SP. But I couldn't see from GUI and then tried to run the script from "select * from sys.database_principals.."
2. Do I have permission to alter user or drop the user or not?
Thanks for your help.
Tigonyeu
February 12, 2009 at 9:40 am
Are you really running SQL 7 or 2000? If you are then sys.database_principals does not exist.
In SQL Server 2005 ff you want to check to see if a login is disabled you would want sys.server_principals is_disabled column.
In 7 and 2000 you can't disable a login, but you can deny access and check that in syslogins on the denylogin column.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
February 12, 2009 at 11:43 am
I'm using 2005, I saw the is_disable collumm but the login I want to check is under the database login not on the server login. Please help me to check it. Thanks
February 12, 2009 at 1:18 pm
There is no disabled users in a database. There may be users with no permissions or with permissions explicitly denied, but you can't disable a database user, you disable a login. Just to make sure we are on the same page I will define user and login:
Login - an object that has permission to connect to the SQL Server and may have server level permission, but may or may not have access to a database or databases
User - an object that is contained within a database that has permissions within the database and maps to Login.
As dbo within a database you have the permissions to Alter/Drop/Create users within the database, but not to alter logins.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply