I need to query the MS SQL Server database from linux terminal. Searching the Internet and on this site I found freetds and then sqsh. I installed them and it seems to connect to the server, but I can not get it to execute the request, I definitely have something wrong.
I install freetds as:
[MSSql]
host = 192.168.1.4
port = 1433
tds version = 7.0
The database server is Sql Server 2008 r2.
When connecting, I use the following command:
sqsh -S MSSql -U sa -P sa -D databasename
Which gives me a hint like:
sqsh-2.1.7 Copyright (C) 1995-2001 Scott C. Gray
Portions Copyright (C) 2004-2010 Michael Peppler
This is free software with ABSOLUTELY NO WARRANTY
For more information type '\warranty'
1>
Then I try to enter a query, for example:
1> select * from C_PROPS;
But nothing happens. What am I doing wrong? It just needs simple selections and updates.
source
share