title: Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login failed for user 'sa'
body: <p>I am trying to execute one stored procedure using 'sa' user through perl script</p>
  
  <p>save this line in a perl file and execute that perl file</p>
  
  <pre><code>system("start /wait sqlcmd.exe -S serverName -U sa -P test@123 -d JSONdb -Q \"EXECUTE UPDATE_SP\" -o C:\\Temp\\log.txt");
  </code></pre>
  
  <p>=============================================================================</p>
  
  <blockquote>
    <p>-S serverName :: sql server which i want to connect.</p>
    
    <p>-U sa -P test@123 :: login user credentials</p>
    
    <p>-d JSONdb :: database name.</p>
    
    <p>\"EXECUTE update_JSONTable\" :: command to execute stored procedure
    [update_JSONTable]</p>
    
    <p>-o C:\Temp\log.txt" :: saving  logs</p>
  </blockquote>