Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to check the disable account Expand / Collapse
Author
Message
Posted Thursday, February 12, 2009 9:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 1, 2010 7:55 AM
Points: 4, Visits: 20
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
Post #655829
Posted Thursday, February 12, 2009 9:40 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:09 AM
Points: 10,342, Visits: 13,352
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

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

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
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #655870
Posted Thursday, February 12, 2009 11:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 1, 2010 7:55 AM
Points: 4, Visits: 20
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
Post #655977
Posted Thursday, February 12, 2009 1:18 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:09 AM
Points: 10,342, Visits: 13,352
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:

[ul]
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.
[ul/]

As dbo within a database you have the permissions to Alter/Drop/Create users within the database, but not to alter logins.




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

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
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #656058
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse