title: How to Open a Database from Visual Studio Server Explorer in SQL Server?
body: <p><strong>Question Background</strong></p>
  
  <p>I have a created a database in Visual Studio under the Server Explorer tab. This is fine but I would like to be able to open this database in SQL Server Management Studio (SQL Server 2008 in this case). I can't see the database under the database list in SQL.</p>
  
  <p><strong>How can I open the database I've created in Visual Studio in SQL Server?</strong></p>
  
  <p>The following diagrams show the issues:</p>
  
  <ol>
  <li>The MainDB.mdf database in VS:</li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/exRGS.jpg" alt="enter image description here"></p>
  
  <ol start="2">
  <li>SQL Server 2008 Management Studio. The database MainDB database is not showing:</li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/XksmX.jpg" alt="enter image description here"></p>