linsql2 is an updated version of the command line client for MS-SQL that can execute arbitrary SQL queries and OS commands, when the username/password of the MS-SQL server is known. This version supports the API of the latest freetds library.
4a7f09b14553a97a9a8574a315ad5054939fcc9f829e00560c83fedc1daeea48