Security Guide > Security Guide > Assigning Privileges and Granting Permissions > Grant Overhead > DBMSINFO--View Permissions for Current Session
Was this helpful?
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”:
SELECT DBMSINFO('QUERY_ROW_LIMIT');
Note:  The DBMSINFO function allows other request_name values relating to other aspects of the current session. For details, see the DBMSINFO Function section of the SQL Language Guide.
 
Last modified date: 11/09/2022