background image
<< Built-in system functions | SYSCS_UTIL.SYSCS_GET_XPLAIN_MODE system function >>

SYSCS_UTIL.SYSCS_GET_USER_ACCESS system function

<< Built-in system functions | SYSCS_UTIL.SYSCS_GET_XPLAIN_MODE system function >>
Derby Reference Manual
152
VALUES
SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.locks.deadlockTimeout');
SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS system function
The
SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS
function returns a
VARCHAR(32672) value representing the query execution plan and run time statistics
for a java.sql.ResultSet. A query execution plan is a tree of execution nodes. There
are a number of possible node types. Statistics are accumulated during execution
at each node. The types of statistics include the amount of time spent in specific
operations, the number of rows passed to the node by its children, and the number of
rows returned by the node to its parent. (The exact statistics are specific to each node
type.)
SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS
is most meaningful for DML
statements such as SELECT, INSERT, DELETE and UPDATE.
Syntax
VARCHAR(32672) SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()
Execute privileges
By default, all users have execute privileges on this function.
Example
VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()
SYSCS_UTIL.SYSCS_GET_USER_ACCESS system function
The
SYSCS_UTIL.SYSCS_GET_USER_ACCESS
function returns the current connection
access permission for the user specified.
If no permission is explicitly set for the user, the access permission for the user is the
value of the default connection mode. The default connection mode is set by using the
derby.database.defaultConnectionMode
property.
Syntax
SYSCS_UTIL.SYSCS_GET_USER_ACCESS (USERNAME VARCHAR(128)) RETURNS
VARCHAR(128)
USERNAME
An input argument of type VARCHAR(128) that specifies the user ID in the Derby
database.
The value that is returned by this function is either
fullAccess
,
readOnlyAccess
, or
noAccess
.
A return value of
noAccess
means that the connection attempt by the user will be
denied because neither the
derby.database.fullAccessUsers
property nor the
derby.database.readOnlyAccessUsers
property is set for the user, and the
derby.database.defaultConnectionMode
property is set to
noAccess
.
The names of the connection permissions match the existing names in use by Derby.
Execute privileges
If authentication and SQL authorization are both enabled, only the
database owner
has
execute privileges on this function by default. See "Enabling user authentication" and
"Setting the SQL standard authorization mode" in the Derby Developer's Guide for more
information. The database owner can grant access to other users.
Example