title: How to attach database mdf file to SQL Server Express without Management Studio?
body: <p>Currently I am working on a C# Windows application, and this application is using SQL Server Express.</p>
  
  <p>I have installed SQL Server and the Management Studio on my PC. </p>
  
  <p>I have installed SQL Server Express on the client's PC, but I don't want to install Management Studio as well.</p>
  
  <p>How do I attach my <code>.mdf</code> and <code>.ldf</code> files to SQL Server Express, without having SQL Server Management Studio installed?</p>
  
  <p>This is my connection string</p>
  
  <pre><code>Data Source=.\\SQLEXPRESS;Initial Catalog=dbname;Integrated Security=False;User Id=sa;Password=password;Connect Timeout=0
  </code></pre>