Reputation: 3
I am using sqlcmd to query a SQL server database from a UBUNTU machine (an ODBC driver was installed for this purpose)
If I pass the following command:
sqlcmd -S xyz -d xyz -U xyz
I am prompted for a password, and I can then successfully query the database in question. But, if pass the command below, I get the message 'Login failed for user ****':
sqlcmd -S xyz -d xyz -U xyz -P xyz
I need to be able to send the password in one pass, as I need to pass an input query file and send the output to a specific location. Once I log into the database by waiting for a password prompt, I can no longer specify input/output files. Any insights would be much appreciated
Upvotes: 0
Views: 1253