Using vsql Almost Anywhere

[Deleted User][Deleted User] Administrator
edited May 2018 in Tips from the Team

Jim Knicely authored this tip.

I’m an old school kind of guy so I love our vsql command line interface (CLI) tool. What’s cool is if I am on a remote Linux host, I can copy the vsql binary from the database host and run then run it locally.

Example:

[dbadmin@s18384357 ~]$ vsql
-bash: vsql: command not found

[dbadmin@s18384357 ~]$ scp verticademos.com:/opt/vertica/bin/vsql /usr/bin
vsql

[dbadmin@s18384357 ~]$ vsql -h verticademos.com
Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type:  \h or \? for help with vsql commands
       \g or terminate with semicolon to execute query
       \q to quit

dbadmin=>

Have Fun!

Comments

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

    Note that the vsql CLI does have some several dependencies:

    [dbadmin@s18384357 ~]$ ldd /opt/vertica/bin/vsql
            linux-vdso.so.1 =>  (0x00007fff2773c000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fad2f594000)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fad2f354000)
            libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fad2f134000)
            libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fad2ef14000)
            libdl.so.2 => /lib64/libdl.so.2 (0x00007fad2ed0c000)
            libssl.so.10 => /opt/vertica/lib/libssl.so.10 (0x00007fad2ea9c000)
            libcrypto.so.10 => /opt/vertica/lib/libcrypto.so.10 (0x00007fad2e6b4000)
            libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fad2e3a4000)
            libm.so.6 => /lib64/libm.so.6 (0x00007fad2e11c000)
            libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fad2defc000)
            libc.so.6 => /lib64/libc.so.6 (0x00007fad2db64000)
            /lib64/ld-linux-x86-64.so.2 (0x00007fad2f7b4000)
            libfreebl3.so => /lib64/libfreebl3.so (0x00007fad2d95c000)
            libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fad2d714000)
            libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fad2d424000)
            libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fad2d21c000)
            libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fad2cfec000)
            libz.so.1 => /lib64/libz.so.1 (0x00007fad2cdcc000)
            libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fad2cbbc000)
            libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fad2c9b4000)
            libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fad2c78c000)
    
Sign In or Register to comment.