3. Statements : OpenROAD SQL Statements : Grant (privilege) Statement : Parameters—Grant (privilege) Statement
 
Share this page                  
Parameters—Grant (privilege) Statement
This statement has the following parameters:
privilege
Specifies the privilege, which must be valid for the object_type.
Valid privileges are described under the section Object Privileges (see Object Privileges).
object_type
Specifies the type of object on which you are granting privileges. Object_type must be one of the following:
table
(Default) Controls access to individual tables or views.
database
Controls access to database resources.
procedure
Controls who can execute individual database procedures.
dbevent
Controls who can register for and raise specific database events.
current installation
Grants the specified privilege on the current installation.
The object_type must agree with the privilege being granted (for example, EXECUTE privilege cannot be granted on a table).
Privileges cannot be defined for more than one type of object in a single grant statement. If object_type is current installation, object_name must be omitted.
object_name
Specifies the name of the table, view, procedure, database event, sequence or database for which the privilege is being defined. The object must correspond to the object_type. For example, if object_type is table, object_name must be the name of an existing table or view.
auth_type
Specifies the type of authorization to which you are granting privileges. A grant statement cannot contain more than one auth_type. Valid auth_types are:
user
group
role
The auth_ids specified in the statement must agree with the specified auth_type. For example, if you specify auth_type as group, all auth_ids listed in the statement must be group identifiers.
Default: user
public
Grants a privilege to all users. The auth_type parameter can be omitted.
auth_id
Specifies the name of the users, groups, or roles to which you are granting privileges, or PUBLIC. Both PUBLIC and a list of auth_ids can be specified in the same grant statement. If the privilege is subsequently revoked from PUBLIC, the individual privileges still exist.