How to check the disable account

  • 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

  • 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.

  • 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

  • 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.

      Viewing 4 posts - 1 through 3 (of 3 total)

      You must be logged in to reply to this topic. Login to reply