re number of users in properties show 5

  • Hi,

    in sql server express management studio,

    when we right click the db > properties > its shows number of users =5 why is it so when only one user is allocated to it.

    please help

  • I have never seen this number to be accurate in Management Studio. I would be interested in finding out where this figure is pulled from and how often it's updated.

  • It is using the following query.

    Use DatabaseName

    GO

    SELECT

    u.name AS [Name]

    FROM

    sys.database_principals AS u

    WHERE

    (u.type in ('U', 'S', 'G', 'C', 'K'))

  • Thanks Ken! I guess I read "Number of Users" as "Number of Users Connected to the Database"

  • Yes. I should have clarified that in the first post. It is the number of database users not the current number of users connected.

  • Hi,

    i created a new database and it also showed 5 users, i think

    1) sa

    2) username created by helm

    what do you suggest for 3 4 and 5 are these system accounts created by the database

    please recommend

  • They are automatically created.

    dbo

    guest

    INFORMATION_SCHEMA

    sys

  • Ok,

    but that will make the count to 6 that means that the user created by helm as db user is not counted or one of them you have mentioned is not present.

    what do you suggest is there we can check which of the users have permissions on teh db

    kindly recommend

  • sa is not listed in the table and the Where clause is filtering out the Roles.

Viewing 9 posts - 1 through 8 (of 8 total)

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