title: sqlcmd - connect to local instance of SQLEXPRESS
body: <p>I want to run a .sql batch script to delete records from a number of tables from cmd window.  So, for that I am trying to connect to my local instance of SQLEXPRESS using following command-</p>
  
  <blockquote>
    <p>sqlcmd -e -s \SQLEXPRESS</p>
  </blockquote>
  
  <p>However, I am not able to connect and getting following error:</p>
  
  <pre><code>'Named Pipes Provider: Could not open a connection to SQL Server [2]'.
  </code></pre>
  
  <p>One more weird thing that I notice from the error message is that above command is trying to connect to SQL Server 2005 whereas the instance running on my machine is SQLEXPRESS 2008.</p>
  
  <p>Can anyone please guide.</p>
  
  <p>P.S. I am using Windows Authentication to connect to SQLEXPRESS which is when I go to connect using Mgmt Studio.</p>