title: Running sqlcmd locally - Error Locating Server
body: <p>I am trying to run a SQL script locally using <code>sqlcmd</code>, but I keep getting the following response:</p>
  
  <blockquote>
    <p>HResult 0xFFFFFFFF, Level 16, State 1<br>
    SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].</p>
    
    <p>Sqlcmd : error : Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..</p>
    
    <p>Sqlcmd : error : Microsoft SQL Server Native Client 10.0 : Login timeout expired</p>
  </blockquote>
  
  <p>I am running the following command:</p>
  
  <pre><code>sqlcmd -S Server\DbName -E -i C:\data.sql
  </code></pre>
  
  <p>I have also tried with <code>127.0.0.1\DbName</code> and <code>localhost\DbName</code>.  Same result.  I have also looked in the configuration manager and made sure Named Pipes and TCP are enabled for SQL Native Client 10.0.</p>
  
  <p>How do I get this script to run?</p>