Creating Groups in Interactive SQL

A group is identified by a user ID, just like a single user, but this user ID is granted the permission to have members.

  1. Connect to the database as a user with either DBA or both USER ADMIN and PERMS ADMIN authority. USER ADMIN is needed for CREATE USER, and PERMS ADMIN is needed for GRANT GROUP.
  2. Create the group's user ID just as you would any other user ID, using the following SQL statement:
    CREATE USER personnel
    IDENTIFIED BY group_password
  3. Give the personnel user ID the permission to have members, with the following SQL statement:
    GRANT GROUP TO personnel

    The GROUP permission, which gives the user ID the ability to have members, is not inherited by members of a group. If this were not the case, then every user ID would automatically be a group as a consequence of membership in the special PUBLIC group.

    The previous example creates a groups with a user ID and password. You can also create a group without a password in order to prevent anybody from signing on using the group user ID. .