0

I need to automatize sqlserver scripts from a linux environment. I saw Microsoft released a linux version of its ODBC driver, that also includes sqlcmd for linux. Though, it's only available for redhat.

I found a few tutorials to force installation on several other linux versions (including debian), but they seem to be out of date : many points are wrong or -- probably -- not suited anymore.

I also tried to install and run sqsh, but I got an error trying to connect, and miss the guides to help configure it

sqsh -S xy.zk.lm.opqr -U sas -D myDB
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'
Password: ... 
Msg 18456, Level 14, State 1
Server 'AUB-DB-QUALIF\SQLEXPRESS', Line 1
▒chec de l'ouverture de session de l'utilisateur▒'sas'.
Open Client Message
Layer 0, Origin 0, Severity 78, Number 34
Adaptive Server connection failed

Since I miss skills using linux, I may not see the "obvisous" way to do it. Thus, if you have any - up-to-date - tip or trick to help run sqlserver as a command line under linux, I'll read you with great attention!

Thanks in advance.

Marvin
  • 1,650
  • 4
  • 19
  • 41
  • 1
    Maybe check this post here: http://stackoverflow.com/questions/149395/what-are-some-ways-of-accessing-microsoft-sql-server-from-linux – erg Jul 05 '16 at 12:16
  • Sorry for my late answer. Yes, that was the right link. Thanks to you! – Marvin Aug 08 '16 at 12:40

1 Answers1

0

Today 2016-11-17 Microsoft released a public preview of SQLServer for Linux (supporting Linux, Mac, Docker,... ) may be you chan use the any of the new versions with the benefits of SQLCMD.

SQL Server for Linux

enter image description here

gavioto
  • 1,695
  • 2
  • 17
  • 38