Users, Groups, and Service Classes
Users, Groups, and Service Classes are managed using DDL SQL statements that allow administrators to create, drop, or alter each type of database object. These commands also allow administrators to associate service classes with groups and control service class settings for workload management.
USER
CREATE USER
CREATE USER creates a new user, which is scoped to the database of the active connection processing the DDL statement. This means that usernames can be reused across different databases.
Syntax
If you specify only a user_name without a database_name, Ocient assumes the user is associated with the database of the active connection.
Define User Parameters (<user_definition>)
You can apply the following optional parameters when creating a new user object.
Example
This example creates a new user named jmack@test-database with the password pass1234.
DROP USER
DROP USER removes an existing user from the system.
To remove a user, you must possess the DROP USER privilege for the user.
If you specify only a user_name without a database_name, Ocient assumes the user is associated with the database of the active connection.
Example
This example removes a user named jmack@test-database.
This example drops multiple users.
ALTER USER
Change the status of a user using the ALTER USER SQL statement.
Required Privileges
To change the state of a user, you must have ALTER privileges on the user or one of these roles:
- System Administrator Role
- Security Administrator Role
- Administrator Role on the database of the user
Users cannot change their own state.
Syntax
Examples
Enable a User
Enable a user named example_user.
Disable a User
Disable a user named example_user.
Expire the Password of a User
Change the example_user user to the password_expired state. This action requires the user to update their password on their next successful login.
ALTER USER SET
Changes the password of an existing user.
Syntax
If you specify only a user_name without a database_name, Ocient assumes the user is associated with the database of the active connection.
Example
This example changes the password of user "jmack@test-database" to 'newpass'.
GROUP
CREATE GROUP
CREATE GROUP creates a new group. The name must be distinct from the name of any existing group in the database.
Example
This example creates a new group named group1.
DROP GROUP
DROP GROUP removes an existing group from the system.
To remove a group, you must possess the DROP GROUP privilege for the group.
Syntax
Example
This example removes a group named group1.
This example removes multiple groups.
ALTER GROUP
ALTER GROUP USER
ALTER GROUP adds or removes users from the group using the USER keyword.
Syntax
If you specify only a user_name without a database_name, Ocient assumes the user is associated with the database of the active connection.
Example
This example adds user1 to an existing group named group1.
ALTER GROUP RENAME
ALTER GROUP renames an existing group by including the RENAME TO keyword.
Syntax
Example
This example renames an existing group group1 to group2.
ALTER GROUP SET SERVICE CLASS
Set a service class for the specified group.
Syntax
Example
ALTER GROUP ALTER SECURITY
Set the security settings at the group level using the ALTER GROUP ALTER SECURITY SQL statement. Replace <security_setting> with the security setting and <value> with the value.
Syntax
password_complexity_levelpassword_no_repeat_countpassword_lifetime_dayspassword_invalid_attempt_limit
For details about these values, see Database Password Security Settings. | |value| numeric | An integer to represent one of the security settings. For details about this value, see Database Password Security Settings. |
Example
Set the password lifetime to 10 days for the group example_group.
SERVICE CLASS
CREATE SERVICE CLASS
A service class defines a set of limits on various system parameters.
The Ocient System applies service classes per group. By default, all groups are in the DEFAULT service class, which has no limits.
If a user belongs to multiple groups with different service classes, the system uses the first service class alphabetically by service class name.
Syntax
Define Service Classes ( <service_class_definition> )
When you create a new service class, the Ocient System sets any omitted service class definitions to the maximum or least restrictive value. Each definition should be comma-separated. When you alter a service class definition, the system modifies only the definition you specify.
See the Workload Management Walkthrough for more details.
Example
This example creates a service class named sc_name.
DROP SERVICE CLASS
Remove an existing service class from the system.
When dropping a service class, you can use the FORCE flag to drop a service class and unset it from any dependent groups. If FORCE is not used, the function throws an error if there are dependent groups.
Syntax
Example
ALTER SERVICE CLASS
ALTER SERVICE CLASS RENAME
Rename a service class.
Syntax
Example
ALTER SERVICE CLASS SET
Alter a service class with new parameter definitions by using the SET keyword.
Syntax
For the service class definition parameters <service_class_definition>, see Define Service Classes.
Examples
This example changes the value of MAX_ROWS_RETURNED to 51 on the service class named sc_name.
This example makes dynamic priority adjustments at the service class level for a priority adjustment time of 15 seconds, priority adjustment factor of 0.75, minimum priority of 2.0, and maximum priority of 5.0.
This example sets the service class sc_name to handle queries matching the regular expression .*my_table.*.
ALTER SERVICE CLASS RESET
Alter a service class by restoring default values for one or more specified settings.
Syntax
For descriptions of the <service_class_definition> parameters, see Defining Service Classes.
Example
This example resets the value of MAX_ROWS_RETURNED on the service class named sc_name.
ALTER QUERY
Set the priority of a SQL query that is running. This priority takes effect immediately. The priority must remain within service class priority limits. The Ocient System overrides other preset priorities for this query, including any existing dynamic priority adjustments.
Syntax
Example
This example sets the priority of the SQL query 34566 to 2.
Related Links
Manage Users, Groups, and Roles

