title: sql server: error 997 when specifying password in the command line
body: <p>In SQL server 2014, I try to invoke a sql script using command line: </p>
  
  <blockquote>
    <p>~ osql -U sa -P passwd -i script.sql</p>
  </blockquote>
  
  <p>and I get an error message: 
  Login failed for user 'sa'
  OS Error 997 Overlapped I/O operation is in progress. </p>
  
  <p>However, when I run the command in interactive mode: </p>
  
  <blockquote>
    <p>~ osql -U sa -i script.sql</p>
  </blockquote>
  
  <p>it asks for password and the command succeeds. Can someone please help me how to run sql scripts purely from command line without user intervention? </p>
  
  <p>thanks. </p>