sqlcmd won't execute - Claims Native Client not installed properly

Posted by nuit9 on Server Fault See other posts from Server Fault or by nuit9
Published on 2011-02-23T02:34:35Z Indexed on 2012/10/13 3:39 UTC
Read the original article Hit count: 573

Filed under:
|

I'm trying to use sqlcmd to execute some SQL scripts.

Using a test command with a simple query like:

sqlcmd -S HOSTNAME -d MYDATABASE -Q 'SELECT Names FROM Customers'

sqlcmd does not appear to make any attempt to connect to the server as it displays this message:

Sqlcmd: Error: Connection failure. SQL Native Client is not installed correctly. To correct this, run SQL Server Setup.

The native client was presumably installed as part of the SQL Server setup and likely correctly. I actually get this message on any machine with SQL server installed trying to use sqlcmd so it's not a matter of the installation being corrupt.

Unfortunately the message really tells me nothing about the problem so I don't know what the real issue is. I know the SQL Native client is working properly since a vbscript was able to execute SQL queries against the database.

Is there some additional configuration needed to use sqlcmd?

© Server Fault or respective owner

Related posts about sql-server

Related posts about sqlcmd