Dbmsinfo--View Permissions for Current Session
You can use the dbmsinfo function to obtain the current value of any database privilege in effect for the current session.
To issue a dbmsinfo request, use the following syntax:
select dbmsinfo('request_name');
The request_name can be any of the following parameters:
connect_time_limt
The session’s value for the connect time limit, or ‑1 if none
create_procedure
"Y" if the session has create procedure privileges or "N" if not
create_table
"Y" if the session has create table privileges or "N" if not
db_admin
"Y" if the session has the db_admin privilege or "N" if not
idle_time_limit
The session's value for the idle time limit or -1 if none
lockmode
"Y" if the session can issue the set lockmode statement or "N" if not
query_cost_limit
The session's value for the query cost limit or -1 if none
query_cpu_limit
The session's value for the CPU limit or -1 if none
query_io_limit
The session's value for the query I/O limit or -1 if none
query_page_limit
The session's value for the query page limit or -1 if none
query_row_limit
The session's value for the query row limit or -1 if none
session_priority
The session's current priority or -1 if none
select_syscat
"Y" if the session has the select_syscat privilege or "N" if not
update_syscat
"Y" if the session has the update_syscat privilege or "N" if not
Example: Return the Value of Query Row Limit for Current Session
Assuming the Query_row_limit permission for the current session is 50, the following query returns the value “50” in x:
select x = dbmsinfo('query_row_limit') as x;
Note: The dbmsinfo function allows other request_name values relating to other aspects of the current session. For details, see the chapter “Transactions and Error Handling” in the SQL Reference Guide.
Last modified date: 08/28/2024