Sample Header Ad - 728x90

Running sqlcmd errors

2 votes
2 answers
322 views
I am trying to run an MSSQL script using sqlcmd on Windows 10. The command is something like this:
sqlcmd -S "host" -U "user" -P "password" -d "database" -C -i "script.sql" -I
where the values here are dummy values. I’m getting the message:
Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server :  Data source name not found and no default driver specified.
I didn’t set up the system, so I don’t know how everything has been installed, but I assume that the sqlcmd was installed with SQLServer Express. When I check the version, I get:
Microsoft (R) SQL Server Command Line Tool
Version 14.0.2052.1 NT
Copyright (C) 2017 Microsoft Corporation. All rights reserved.
I checked the installed drivers and got: enter image description here I don’t know where to go from here. Is it possible to get sqlcmd to use the relevant driver? Why is it looking for version 13 anyway?
Asked by Manngo (3145 rep)
Jun 10, 2025, 11:40 AM
Last activity: Jun 15, 2025, 11:54 AM