title: "SQLCMD -L" fails - why?
body: <p>I am having 2 instances of SQL Server 2008R2 and instance of SQL Server Express 2008.<br>
  SQLCMD, etc., works [1].  </p>
  
  <p>But "<code>SQLCMD -L</code>" and "<code>OSQL -L</code>" fail [2].<br>
  Why?<br>
  What am I missing in SQLCMD use?<br>
  How to use SQLCMD to get servers?  </p>
  
  <p>[1]
  Test results  of SQLCMD  </p>
  
  <pre><code>&gt;sqlcmd
  1&gt; use AdventureWorks2008R2;
  2&gt; SELECT TOP(2) BusinessEntityID, FirstName, LastName From Person.Person;
  3&gt; GO
  Changed database context to 'AdventureWorks2008R2'.
  BusinessEntityID FirstName                                          LastName
  
  ---------------- -------------------------------------------------- --------------------------------------------------
           285      Syed                                               Abbas
           293      Catherine                                          Abel
  (2 rows affected)
  1&gt;
  </code></pre>
  
  <p>[2]</p>
  
  <blockquote>
    <blockquote>
      <p>SQLCMD -L</p>
    </blockquote>
    
    <p>Servers:</p>
    
    <blockquote>
      <p>OSQL -L</p>
    </blockquote>
    
    <p>Servers:
        -- NONE --</p>
  </blockquote>
  
  <p>Update:<br>
  After starting SQLBrowser I have:  </p>
  
  <blockquote>
    <blockquote>
      <p>OSQL -L</p>
    </blockquote>
    
    <p>Servers:<br>
        (local)<br>
        PBLACK<br>
        PBLACK\SQL2008R2<br>
        PBLACK\SQLEXPRESS  </p>
    
    <blockquote>
      <p>SQLCMD -L</p>
    </blockquote>
    
    <p>Servers:<br>
        PBLACK<br>
        PBLACK\SQL2008R2<br>
        PBLACK\SQLEXPRESS  </p>
  </blockquote>
  
  <p>Why does OSQL enumerate (local) but SQLCMD not?<br>
  SQLEXPRESS (is broken, I cannot start it) and SQL2008R2 instance are not running (stopped) - why are they enumerated?<br>
  Is it possible to expose only running SQL Server instances?    </p>