Reputation: 1617
I am new to sybase. I am trying to connect to the database using sqsh.
sqsh -Ddatabasename -Hservername -Uusername
or
sqsh -D databasename -H servername -U username
I get the following error. server name not found in configuration file. unknown host machine name. I am trying to connect using the command line. Wouldn't that bypass a config file.
Upvotes: 2
Views: 3553
Reputation: 9295
I'm on Linux and I use sqsh like this:
sqsh -I /etc/freetds/freetds.conf -Smyserver -Uknb -Pverysecret -Dmydb
-D argument is optional
and in the /etc/freetds/freetds.conf
there is an entry
[myserver]
host = 123.456.78.90
port = 1433
tds version = 7.2
client charset = UTF-8
This used to work for many years. Right now I have some connectivity problems (segfaults), but this can be due to library configuration issues on my PC.
Upvotes: 3
Reputation: 2378
Don’t use the hostname. Use -S for the servername , which must be defined in the interfaces file (or sql.ini file). You can leave the database name out.
Upvotes: 0