I would like to use the sqlcmd
cli on a mac to run a script on a Microsoft SQL Server using Windows Authentication.
Software details:
Mac OS 10.13
MSSQL 2012 version 11.0.2100.60
sqlcmd version 17.0.0001.1 Linux
As a test, I tried:
sqlcmd -S hostname,port\\database_name -U domain\\user.name -P "XXX" -q "select @@version"
But I received the error:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user domain\user.name
I also configured a freetds
DSN and attempted to connect using:
sqlcmd -S DSN_NAME -D -U domain\\user.name -P "XXX" -q "select @@version"
But I received the error:
The DSN specified an unsupported driver
For what it's worth, I'm able to use the same DSN through isql
by doing:
isql DSN user.name password
Any help greatly appreciated!