The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.

Have VSQL Beep Upon Command Completion

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 latter that the script has completed!

Example:

[[email protected] ~]$ cat beep.sql
SELECT version();
SELECT sysdate;
SELECT user;
SELECT 'SOME_DATA';
SELECT 'SOME MORE DATA';
-- Alot more stuff...
SELECT sysdate;

[[email protected] ~]$ vsql -bf beep.sql -o beep.log

<< I heard a “Beep” >>

[[email protected] ~]$ 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/9.2.x/HTML/Content/Authoring/ConnectingToVertica/vsql/CommandLineOptions.htm

Have fun!

Comments

Sign In or Register to comment.

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.