Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use MS SQL Server from the Mac OS X Terminal?

I use a Mac to develop web apps. Our runtime is Java, our web server is Jetty, and our IDE is Eclipse. So our whole stack can be used from Mac and Windows natively … with the exception of our database, which is MS SQL Server (ranging from 2000 to 2008 depending on the application). I want a Unix command-line client for MS SQL Server.

I don't like any of the OS X GUI clients for SQL Server – I find them tedious and not very Mac-like – so for the time being I use SQL Server 2008 Management Studio, on Windows XP, via VMWare Fusion. But it's still a huge pain to launch and quit, it eats up my RAM while it's running, and it poisons my Time Machine backups by altering several 2GB files on disk every time I use it.

I like how MySQL can be used from the command line, so that seems like a great way to quickly get to my database and investigate a bug or add some test data. If only I could use SQL Server that way! Short of implementing a command line client myself using straight JDBC, there anything out there that makes this possible?

like image 509
easeout Avatar asked Mar 24 '11 16:03

easeout


1 Answers

This open source node app that came out in 2014, sql-cli, provides a useful command line console for Mac OS X and other desktops.

like image 75
dcorking Avatar answered Oct 14 '22 20:10

dcorking