Creating groups

Groups let you grant and revoke permissions to more than one user in a single statement, as well as allow you to provide a collective name to a group of users. They are especially useful if you administer an Adaptive Server installation that has a large numbers of users.

Create groups before adding users to a database, since sp_adduser can assign users to groups as well as add them to the database.

You must have the system administrator or system security officer role, or be the database owner to create a group with sp_addgroup. The syntax is:

sp_addgroup grpname

The group name, a required parameter, must adhere to the rules for identifiers. The system administrator, system security officer, or the database owner can use sp_changegroup to assign or reassign users to groups.

For example, to set up the Senior Engineering group, use this command while using the database to which you want to add the group:

sp_addgroup senioreng

sp_addgroup adds a row to sysusers in the current database. Therefore, each group in a database, as well as each user, has an entry in sysusers.