Is there an equivalent to SQLCMD on * nix?

We have a heterogeneous environment in which some developers use OSX and some use Windows. Our build process includes control over SMS versions and requires calling SQLCMD to execute arbitrary scripts - our databases are all SQL Server.

SQLCMD is a command line interface for SQL Server on Windows, similar to Oracle SQL * Plus. We need certain functionality - the ability to run SQL scripts from the command line. Is there an SQLCMD equivalent for * nix?

If not, then the only cross-platform approach I can think of is to load the script file into memory, then execute the script.

Is there a clear leader for a library / language combination that will handle all T-SQL SQL server statements? (I ask about DDL statements because they were a hang in this approach when I tried this in the past.)

+3
source share
1 answer

You can try the utility fisqlthat is part of FreeTDS , the open source SQL Server wired protocol implementation is fisqlimplied as a clone of the ancient isql, predecessor osql, predecessor sqlcmd, but presumably it will work with any level of T-SQL.

Disclaimer: I myself have not used FreeTDS.

+1
source

All Articles