Previous Topic

Next Topic

Create Group

Valid in: SQL, ESQL

The Create Group statement establishes a group identifier and associates it with the specified list of users. Group identifiers enable the database administrator (or user that has the security privilege) to grant identical privileges to a group of users. For a complete discussion of group identifiers and their use, see the Database Administrator Guide.

After creating a group identifier and specifying its members, the system administrator can grant privileges to the group identifier. When a member of the group begins a session, the group identifier can be specified in the sql or connect statement (or on the operating system command line, using the -G flag) to obtain the privileges associated with the group.

Previous Topic

Next Topic

Syntax

The Create Group statement has the following format:

[EXEC SQL] CREATE GROUP group_id {, group_id}
              [WITH USERS = (user_id {, user_id})]

Previous Topic

Next Topic

Permissions

You must have maintain_users privileges and be working in a session connected with the iidbdb.

Previous Topic

Next Topic

Embedded Usage

In an embedded Create Group statement, neither group_id nor user_id can be specified using host language variables.

Previous Topic

Next Topic

Locking

The Create Group statement locks pages in the iiusergroup catalog in the iidbdb. This can cause sessions attempting to connect to the server to be suspended until the create group statement is completed.

Previous Topic

Next Topic

Related Statements

Alter Group

Drop Group

Previous Topic

Next Topic

Examples: Create Group

The following are Create Group statement examples:

  1. Create a group identifier for the telephone sales force of a company and put the user IDs of the salespeople in the user list of the group.

    create group tel_sales with users = (harryk,
    joanb, jerryw, arlenep);

  2. In an application, create a group identifier for the inventory clerks of a store and place their user IDs in the user list of the group.

    exec sql create group inv_clerk with users =
    (jeanies, louisem, joep);


© 2007 Ingres Corporation. All rights reserved.