Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Thursday, May 13, 2010 6:24 PM
This little question is part of a much larger issue I am trying to resolve:
Does SQLCMD require a separate install or is it included with the Microsoft SQL Server 2008 Native Client (which I just installed on my webserver).
Maybe this is just an incorrect path issue. Here is what I tried:
C :\ sqlcmd - S tcp : devmojito \ mssqlserver2008 , 1433
'sqlcmd' is not recognized as an internal or external command , operable program or batch file C :\
This same syntax works when executed from the c drive on my SQL Server machine.
Friday, May 14, 2010 4:45 PM ✅Answered
Your first hunch was correct - sqlcmd does NOT install with SNAC. SNAC just includes the bare ODBC drivers, OLEDB drivers, and a couple other utilities. You can install sqlcmd as part of the Feature Pack (or from the blanket SQL Server installer). On the Feature Pack page (http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en) it is under this set of features:
Microsoft SQL Server 2008 Command Line Utilities
This post is provided 'as is' and confers no express or implied warranties or rights.
Thursday, May 13, 2010 6:41 PM
It gets installed with SNAC.
Most likely in your case it is a path issue i.e. path to the SQCMD or bin directory is not in your system
You can configure the PATH environment variable in My Computer -->Properties --> Advanced --> Environment Variables --> System variables
SET PATH=%PATH%;%Program Files%/Microsoft SQL Server\100\Tools\Binn
.. though you can still run it form the directory where it gets installed, so on the command promt navigate to Binn folder and try to run it from there.
on my SQL 2008 SQLCMd resides in %PROGRAMFILES%\Microsoft SQL Server\100\Tools\Binn\
Thursday, May 13, 2010 7:35 PM
Thanks for help but my Program Files is NOT like yours. I just installed SQL Server 2008 Native Client (SNAC?) yesterday (verified by seeing entry in Control Panel -> Add Remove Program list). Yet at this location:
C:\Program Files\Microsoft SQL Server\100
I see only 2 subfolders:
KeyFile
License Terms
..no Tools and no Binn
I will repeat the install of the SNAC.
Friday, May 14, 2010 9:47 PM
Thanks guys. While I still have not yet installed SQLCMD, I resolved (one part) of my problem in a different manner. I asked my network admin and he monitored the traffic as seen from the webserver to the database server and noticed that when I tried to connect to the named instance of SQL2008 a different port than 1433 was used (and blocked by our firewall settings). Discovered further that "dynamic porting" was ON and port 1219 was set so we turned off dynamic porting and made 1219 the port for the named instance of SQL2008 and set the firewall to allow that port. This resolved the issue. Thanks again.