Options

vsql client does not bring vsql prompt back but executes queries?

Env: Windows Server 2003
Client: vsql version v6.0.1, built for Windows 64 bit

Trying to run vsql to connect to my DB and executed queries but vsql does not seem to bring back the vsql prompt - see snippets below

When i use the "-c" version it executes the query and brings back results

C:\>vsql -h myhost -p 5433 -U username -w pwd -c "select count(*) from etl_status"
 count
-------
   209
(1 row)



WHen i need to use the interactive terminal it doesnt seem to bring back the prompt?

C:\>vsql -h myhost -p 5433 -U username -w pwd
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


C:\>

This brings back "C:\>". 

Comments

  • Options
    That's interesting.

    I wonder if vsql is returning an error? Try using the following command to see if there was an error after trying to connect:

    echo %ERRORLEVEL%

    That command should return an error code of 0, 1, 2 or 3, where:

    0 to the shell if it finished normally

    1 if a fatal error of its own (out of memory, file not found) occurs

    2 if the connection to the server went bad and the session was not interactive

    3 if an error occurred in a script and the variable ON_ERROR_STOP was set

    If there is no error, can you find out what the values are for the PROMPT variables using:
    vsql -h myhost -p 5433 -U username -w pwd -c "\set"
  • Options
    Thank you - these are some useful tips.

    But i managed to work this out by installing a "newer" version of the client in a different location and bringing it up. And it connected with no issues. Thanks again for your input - i can use these techniques for other troubleshooting.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file