Faced the problem of using sqlcmd in sqlserver, but I do not know for which server versions it fits, I could not find it. this console does not depend on the version of sql server? So, if I want to install sqlcmd on sqlserver 2003, it will work or need a version of the server> 2008 ???
Asked
Active
Viewed 480 times
-1
-
There is no SQL Server 2003. And I'm not sure what you're trying to ask here. – Damien_The_Unbeliever Aug 16 '18 at 12:57
-
There's no such thing as SQL Server 2003 -- perhaps you meant Windows Server 2003? As long as the SQL native client is installed and able to connect to SQL Server, `sqlcmd` will work. In particular, older versions are able to connect with newer versions of SQL Server, and vice versa, unless you're using things like `DATETIME2` or other features from later versions, where you may get errors or unwanted conversions. In general, there is no reason not to use the latest version of `sqlcmd` on the most recent version of Windows, so you can connect to any server. – Jeroen Mostert Aug 16 '18 at 12:59
-
You can download and install SQLCMD separately if it's not already installed. The latest will work against older SQL versions. https://www.microsoft.com/en-us/download/details.aspx?id=53591 – Dan Guzman Aug 16 '18 at 13:00
-
I wrote this several seconds before you, as answer ;-) – Ronen Ariely Aug 16 '18 at 13:01
1 Answers
0
Good day,
sqlcmd is not part of SQL Server but external utilities.If you want to use it then you need to install it (together with other tools like SSMS or separately). You can download the last version (at this time) from Microsoft directly from this link.
You should use the latest version even if you use older version of SQL Server (from 2008 and above) since the new version include support for new features. Do not use old version of sqlcmd to connect newer version of SQL Server even so it should work for basic tasks
--- update: adding some more information ---
Here you can find more information regarding how to use the tool: https://learn.microsoft.com/en-us/sql/tools/sqlcmd-utility

Ronen Ariely
- 2,336
- 12
- 21