Have VSQL Beep Upon Command Completion

Posted September 6, 2019 by James Knicely, Vertica Field Chief Technologist

Photo of actual roadrunner running on a road showing yellow stripe in the middle

There are a lot of cool command line options available to VSQL. One of my favorites is the –b option which causes Vertica to “beep” when a command completes. This is very useful if you are running a very long sequence of SQL commands via a script. You can go off and do other things while the script runs. VSQL will “beep” once letting you know later that the script has completed!

Example:

[dbadmin@SE-Sandbox-26-node1 ~]$ cat beep.sql
SELECT version();
SELECT sysdate;
SELECT user;
SELECT 'SOME_DATA';
SELECT 'SOME MORE DATA';
-- Alot more stuff...
SELECT sysdate;
[dbadmin@SE-Sandbox-26-node1 ~]$ vsql -bf beep.sql -o beep.log
<< I heard a “Beep” >>
[dbadmin@SE-Sandbox-26-node1 ~]$ cat beep.log
version
------------------------------------
Vertica Analytic Database v9.2.1-5
(1 row)
sysdate
----------------------------
2019-09-03 15:54:41.510405
(1 row)
current_user
--------------
dbadmin
(1 row)
?column?
-----------
SOME_DATA
(1 row)
?column?
----------------
SOME MORE DATA
(1 row)
sysdate
---------------------------
2019-09-03 15:54:41.53582
(1 row)

Helpful Link:

https://www.vertica.com/docs/latest/HTML/Content/Authoring/ConnectingToVertica/vsql/CommandLineOptions.htm

Have fun!