All databases
sysusers contains one row for each user allowed in the database, and one row for each group or role.
The columns for sysusers are:
Name |
Datatype |
Description |
---|---|---|
suid |
int |
Server user ID, copied from syslogins. |
uid |
int |
User ID, unique in this database, is used for granting and revoking permissions. User ID 1 is “dbo”. |
gid |
int |
Group ID to which this user belongs. If uid = gid, this entry defines a group. Negative values may be used for user IDs (uid). Every suid associated with a group or a role in sysusers is set to -2 (INVALID_SUID). |
name |
sysname |
User or group name, unique in this database. |
environ |
varchar(255) null |
Reserved. |
On the Adaptive Server distribution media, master..sysusers contains some initial users: “dbo”, whose suid is 1 and whose uid is 1; “guest”, whose suid is -1 and whose uid is 2; and “public”, whose suid is -2 and whose uid is 0. In addition, both system-defined and user-defined roles are listed in sysusers.
The user “guest” provides a mechanism for giving users not explicitly listed in sysusers access to the database with a restricted set of permissions. The “guest” entry in master means any user with an account on Adaptive Server (that is, with an entry in syslogins) can access master.
The user “public” refers to all users. The keyword public is used with the grant and revoke commands to signify that permission is being given to or taken away from all users.
Nonunique clustered index with “allow duplicate rows” on suid
Unique nonclustered index on name
Unique nonclustered index on uid