I can't seem to authenticate to my SQL server using the following command:
sqlcmd -S myserver -d mydatabase -U user -P password
It always says,
error: 18456, state 1: login failed for "domain\username"
What is weird is that if I test my connection through ODBC with the same credentials it authenticates fine. In the management studio the account I'm using has the dbo_owner privileges on the instance and the database. Also I connect to the instance using those same credentials.
In my event log I also have this error:
Login failed for 'domain\username'. Reason: Failed to open the explicitly specified database [CLIENT MY_IPADDRESS]
I'm no SQL expert and could use some help troubleshooting this if possible.