Can I get OSQL if I install SQL Server Client Tools?
-
We have some legacy .bat scripts full of osql commands to existing SQL Server instances / dbs on our network. We've tried running the .bat scripts from our app server (Win Server 2008) but get the error: "osql.exe' is not recognized as an internal or external command" We are hoping we don't need to install a full-blown SQL Server to get access to osql. I've heard you can get it from the Client Tool installation, and no license required as long as connecting to licensed sql servers. (which we would be). Can anyone confirm? Are "Client Tools" part of the installation discs? Is this a viable solution? Thanks for your help folks!
-
Answer:
The main recommendations appear to be: If you have the install discs / files, then you should be able to install just the Client Tools. Download http://www.microsoft.com/en-US/download/details.aspx?id=35579 (I would try the "SQL Server Management Studio Express (Tools only)" version first) Check out: http://www.mssqltips.com/sqlservertip/1807/sql-server-2008-client-tools-installation/ If you already have a machine with OSQL installed, you might be able to copy just the following two files to the new server (place them in the same directory) and have it work: C:\Program Files\Microsoft SQL Server\110\Tools\Binn\OSQL.EXE C:\Program Files\Microsoft SQL Server\110\Tools\Binn\Resources\1033\osql.rll As far as licensing goes, I found the following file: C:\Program Files\Microsoft SQL Server\110\Tools\Binn\Resources\1033\license_SQLCMD.txt That has the following snippet: MICROSOFT SOFTWARE LICENSE TERMS MICROSOFT SQL SERVER 2012 COMMAND LINE UTILITIES ... 1. INSTALLATION AND USE RIGHTS. You may install and use any number of copies of the software on your devices to design, develop and test your programs. Note: OSQL has been superseded by SQLCMD. When you run OSQL it will display the following message: Note: osql does not support all features of SQL Server 2012. Use sqlcmd instead. See SQL Server Books Online for details. However, if your existing code expects OSQL then you would need to test SQLCMD with your code first to make sure that any behavior changes between OSQL and SQLCMD do not break your code.
knuckle05 at Database Administrators Visit the source
Other answers
The tool you should be using is http://technet.microsoft.com/en-us/library/ms162773.aspx. It is installed with the client tools and replaces the http://technet.microsoft.com/en-us/library/cc879341.aspx.
Mike Fal
Related Q & A:
- How can I get through a proxy server?Best solution by Super User
- How Do I Configure SQL Server 2005 Backend?Best solution by Server Fault
- How can I get the count in SQL?Best solution by Stack Overflow
- How can I get the remote server's date and time at the client side in my application in c#?Best solution by Stack Overflow
- Can I get hired as a server without experience?Best solution by quora.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.