Skip to main content

Set a Client Connection Label

  • February 14, 2018
  • 1 reply
  • 2 views

Forum|alt.badge.img+2

This tip was authored by Jim Knicely.

When you connect to a Vertica database you can set a client connection label to help you later identify the connection.

Example:

=> SELECT SET_CLIENT_LABEL('Daily Load');
        SET_CLIENT_LABEL
--------------------------------
client_label set to Daily Load
(1 row)

=> SELECT GET_CLIENT_LABEL();
GET_CLIENT_LABEL
------------------
Daily Load
(1 row)

=> SELECT client_label FROM sessions WHERE session_id = current_session();
client_label
--------------
Daily Load
(1 row)

Have fun!

1 reply

sKwa
Forum|alt.badge.img+1
  • Participating Frequently
  • February 14, 2018

Hi!

It depends on "client", JDBC/ODBC/Python driver/UDx has another approach. With UDx you can not query database.