Skip to main content

How to set Label / SessionLabel for ODBC connection?

  • December 10, 2013
  • 1 reply
  • 8 views

Karel_Jakubec
Table 'sessions' contains column client_label which is by default blank. We would like to store there some information, e.g. name of schema which is set to in "SEARCH_PATH" for current session. How can I set this label?

We are using ODBC drivers on Linux with Perl::DBI interface (unixODBC and PERL::DBD::ODBC packages).

Thanks, regards
Karel

1 reply

Daniel_Leybovic
Forum|alt.badge.img+1
  • Participating Frequently
  • December 10, 2013

DSN Parameters 
>> Identification >> Label / SessionLabel

https://my.vertica.com/docs/6.1.x/HTML/index.htm#12800.htm

Creating an ODBC DSN for Linux
https://my.vertica.com/docs/6.1.x/HTML/index.htm#11705.htm

>> How can I set this label?
And how you did it before (how you configured a dsn)? In /etc/odbc.ini or ~/.odbc.ini (see second link)

Example:
daniel@synapse ~ $ cat ~/.odbc.ini 
[Vertica]
Description = Development Database
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = dev
Servername =
UID = daniel
PWD = secret
Port = 5433
ConnSettings =
SessionLabel = read_docs