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
SQL
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.
SQL
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.
SQL
If you specify only a
user_name without a database_name, Ocient assumes the user is associated with the database of the active connection.jmack@test-database.
SQL
SQL
ALTER USER
Change the status of a user using theALTER 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.
SQL
Examples
Enable a User
Enable a user named
example_user.
SQL
example_user.
SQL
example_user user to the password_expired state. This action requires the user to update their password on their next successful login.
SQL
ALTER USER SET
Changes the password of an existing user. SyntaxSQL
If you specify only a
user_name without a database_name, Ocient assumes the user is associated with the database of the active connection."jmack@test-database" to 'newpass'.
SQL
GROUP
CREATE GROUP
CREATE GROUP creates a new group. The name must be distinct from the name of any existing group in the database.
SQL
Example
This example creates a new group named
group1.
SQL
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
SQL
Example
This example removes a group named
group1.
SQL
SQL
ALTER GROUP
ALTER GROUP USER
ALTER GROUP adds or removes users from the group using the USER keyword.
Syntax
SQL
If you specify only a
user_name without a database_name, Ocient assumes the user is associated with the database of the active connection.user1 to an existing group named group1.
SQL
ALTER GROUP RENAME
ALTER GROUP renames an existing group by including the RENAME TO keyword.
Syntax
SQL
Example
This example renames an existing group
group1 to group2.
SQL
ALTER GROUP SET SERVICE CLASS
Set a service class for the specified group. SyntaxSQL
Example
SQL
ALTER GROUP ALTER SECURITY
Set the security settings at the group level using theALTER GROUP ALTER SECURITY SQL statement. Replace <security_setting> with the security setting and <value> with the value.
Syntax
SQL
Example
Set the password lifetime to 10 days for the group
example_group.
SQL
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 theDEFAULT 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
SQL
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.
SQL
DROP SERVICE CLASS
Remove an existing service class from the system. When dropping a service class, you can use theFORCE 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
SQL
Example
SQL
ALTER SERVICE CLASS
ALTER SERVICE CLASS RENAME
Rename a service class. SyntaxSQL
Example
SQL
ALTER SERVICE CLASS SET
Alter a service class with new parameter definitions by using theSET keyword.
Syntax
SQL
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.
SQL
SQL
sc_name to handle queries matching the regular expression .*my_table.*.
SQL
ALTER SERVICE CLASS RESET
Alter a service class by restoring default values for one or more specified settings. SyntaxSQL
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.
SQL
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. SyntaxSQL
Example
This example sets the priority of the SQL query
34566 to 2.
SQL

