Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run sqlcmd without having SQL Server installed

I'm working on a Java program that is calling sqlcmd. It works perfectly on a computer with SQL server installed, but not at all on a computer that doesn't. I want to include the necessary exe and dll files to run this command in my jar. Anyone know which ones I need? I already included batchparser90.dll, sqlcmd.exe, and sqlcmd.dll. It still didn't work.

Any suggestions are appreciated. Thanks in advance!

like image 553
chama Avatar asked Feb 18 '10 17:02

chama


People also ask

Is SQLCMD installed by default?

In testing, I have noticed on many machines in my environment, that SQLCMD does not come installed by default.

Does SQLCMD come with SQL Server?

Sqlcmd is a utility that is installed with the Client Tools when you install SQL Server. This tool allows you to execute Transact-SQL statements, stored procedures, and script files at the console.

Is SQLCMD part of SSMS?

SQL Server Management Studio (SSMS)To run sqlcmd statements in SSMS, select SQLCMD Mode from the top navigation Query Menu dropdown. SQL Server Management Studio (SSMS) uses the Microsoft .


1 Answers

Although it's probably too late for the original poster, for future reference, SQLCMD is freely downloadable, so it's not necessary to purchase SQL Server explicitly for this purpose. Presumably the user has SQL Server with CALs or they wouldn't need SQLCMD in the first place.

In any event, the 2008 R2 download as of my typing this is here:

http://www.microsoft.com/en-us/download/details.aspx?id=16978

Download the file: 1033\x64\SqlCmdLnUtils.msi

(EDIT 2013-05-01) Please note this is a fairly old release at this point - see the comments for updated links, or search the Microsoft Download Center for "Microsoft SQL Server Feature Pack" and pick the release that you prefer - the most recent or the one that matches your SQL Server version in use, as you see fit.

like image 167
MikeBaz - MSFT Avatar answered Sep 24 '22 02:09

MikeBaz - MSFT