The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Have VSQL Beep Upon Command Completion

Jim_KnicelyJim_Knicely - Select Field - Administrator

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.