Reset Your Session

Jim_KnicelyJim_Knicely Administrator, Moderator, Employee, Registered User, VerticaExpert

The SHOW commands “shows” run-time parameters for the current session.

dbadmin=> SHOW all;
            name             |                      setting
-----------------------------+---------------------------------------------------
locale                      | [email protected]=binary (LEN_KBINARY)
autocommit                  | off
standard_conforming_strings | on
escape_string_warning       | on
multipleactiveresultsets    | off
datestyle                   | ISO, MDY
intervalstyle               | plain
timezone                    | US/Eastern
search_path                 | "$user", public, v_catalog, v_monitor, v_internal
transaction_isolation       | READ COMMITTED
transaction_read_only       | false
resource_pool               | general
memorycap                   | UNLIMITED
tempspacecap                | UNLIMITED
runtimecap                  | UNLIMITED
idlesessiontimeout          | UNLIMITED
graceperiod                 | UNLIMITED
enabled roles               | dbduser*, dbadmin*, pseudosuperuser*
available roles             | dbduser*, dbadmin*, pseudosuperuser*
(19 rows)

You can modify one or more of these parameters with the SET command.

dbadmin=> SET LOCALE TO en_GB;
INFO 2567:  Canonical locale: 'en_GB'
Standard collation: 'LEN'
English (United Kingdom)
SET

dbadmin=> SET RUNTIMECAP = '1M';
SET

dbadmin=> SHOW locale;
  name  |   setting
--------+-------------
locale | en_GB (LEN)
(1 row)

dbadmin=> SHOW runtimecap;
    name    | setting
------------+---------
runtimecap | 00:01
(1 row)

To quickly reset all of the run-time parameters back to their default values, execute the RESET_SESSION function!

dbadmin=> SELECT reset_session();
    reset_session
----------------------
Reset session: done.
(1 row)

dbadmin=> SHOW locale;
  name  |               setting
--------+--------------------------------------
locale | [email protected]=binary (LEN_KBINARY)
(1 row)

dbadmin=> SHOW runtimecap;
    name    |  setting
------------+-----------
runtimecap | UNLIMITED
(1 row)

Helpful Links:
https://www.vertica.com/docs/9.1.x/HTML/index.htm#Authoring/SQLReferenceManual/Statements/SHOW.htm
https://www.vertica.com/docs/9.1.x/HTML/index.htm#Authoring/SQLReferenceManual/Statements/SET/SETLOCALE.htm
https://www.vertica.com/docs/9.1.x/HTML/index.htm#Authoring/SQLReferenceManual/Statements/SET/SETSESSIONRUNTIMECAP.htm
https://www.vertica.com/docs/9.1.x/HTML/index.htm#Authoring/SQLReferenceManual/Functions/VerticaFunctions/RESET_SESSION.htm

Have fun!

Sign In or Register to comment.