Fujitsu J2X0-2273-01EN Server User Manual


 
3) Grant the role privileges to users.
Grant the role privileges to users.
Use the GRANT statement to grant the role privileges to users.
An example of granting the privileges granted in role STOCKS_A2 to users SATO, SUZUKI, and TANAKA follows.
Example:
To enable the privileges specified with the GRANT statement in the defined role, execute the SET ROLE statement in
an application program. For details on how to execute the SET ROLE statement in an application program, refer to the
"RDB User's Guide: Application Program Development."
Specifying a default role
After a role is created for defining privilege information, a default role can be specified. A default role is a role that is
effective prior to execution of the SET ROLE statement in the application program specified at environment
configuration.
Use the ALTER USER statement to specify a default role.
An example of specifying default role STOCKS_A2 for users SATO, SUZUKI, and TANAKA follows.
Example:
2.12 Defining Optimization Information
For more efficient database access, define optimization information. Determine the optimization information by
considering the number of records stored in the database and the changes in the index key caused after the definition
of the storage structure is completed.
After defining the optimization information, fetch and analyze an access plan so the database can be tuned
appropriately. Once the database is tuned by an access plan, optimization information need not be redefined and
updated even if the data status is changed. For details on how to fetch and analyze the access plan, refer to the
SQLTOOL User's Guide.
If it is impossible to estimate the number of records to be stored in a database and variations of the index key,
optimization information can be defined after the data is actually stored.
What is optimization information?
Optimization information is used to efficiently process data according to data status. It is defined for base table and
index DSIs, and is used to execute application programs. Optimization information contains values that depend on the
79