How to download data from SQL Server in UNIX

  • I know that SQL Server runs on Windows Server, is it possible to download data in UNIX using shell script? does SQL Server has any binary or command line client for any operating system other than Windows?

  • In the absence of any additional information on your requirement, there are plenty of options for you.

    For example PERL has the DBI connectivity libraries which work just fine for connecting to a SQL Server host from PERL scripts which are supported on Unix.

  • Thanks, I actually want to do it using shell script, without using Perl, Python or Java, if at all possible.

  • Have you thought about putting an SSH server onto your SQL Server and call it from the UNIX box.

    You can then initiate SQL exports / BCP / whatever you're having yourself, and SFTP / SCP / FTP the data to your unix host.

  • This sounds like a good solution, do you know any SSH Server for Windows?

  • Quick thought, while the SSH will work it is not a perfect solution, relatively slow, increased attack surface etc.. Why not use ODBC connection from the UX? Or schedule a job on the SQL box to dump a file on a share (SAMBA)? Or use the command line tools from the Microsoft ODBC Driver 11 for SQL Server on Linux?

    😎

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply