vsqlrc implementation in Windows

Moderator: NorbertKrupa

Post Reply
MikeB
Newbie
Newbie
Posts: 2
Joined: Tue Apr 11, 2017 4:17 pm

vsqlrc implementation in Windows

Post by MikeB » Tue Apr 11, 2017 5:35 pm

I am in a windows 7 batch environment and need help in setting up a configuration file (vsqlrc) on the PC.
We need move jobs among programmers without the security issues surrounding Userids and Passwords

I have the instructions for VSQL_HOME, however they do not address windows.

Is this functionality available on the windows platform?

This is what I am trying to do:

vsql -h VSQL_HOST -p 5433 -U VSQL_USER -w VSQL_PASSWORD -l

I am testing using only the VSQL_HOST variable so I don’t get locked out.

The message I get is: vsql: Could not translate host name “VSQL_HOST” to address

Thanks in advance

Mike

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1775
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: vsqlrc implementation in Windows

Post by JimKnicely » Tue Apr 11, 2017 6:24 pm

You can set environment variables in DOS:

Example:

C:\>set "VSQL_HOST=192.168.56.102"

C:\>set "VSQL_USER=dbadmin"

C:\>set "VSQL_PASSWORD=vertica8"

C:\>C:\"Program Files\Vertica Systems"\VSQL64\vsql
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

Warning: Console code page (437) differs from Windows code page (1252)
8-bit characters may not work correctly. See vsql reference
page "Notes for Windows users" for details.

dbadmin=>
Jim Knicely

Image

Note: I work for HPE. My views, opinions, and thoughts expressed here do not represent those of my employer.

MikeB
Newbie
Newbie
Posts: 2
Joined: Tue Apr 11, 2017 4:17 pm

Re: vsqlrc implementation in Windows

Post by MikeB » Fri Apr 14, 2017 4:51 pm

Jim,

Thanks for the solution. I was over thinking it.
I will load the variables into memory from a file at PC startup.

Mike

Post Reply

Return to “New to Vertica”