title: Cannot connect to Sql Server from Visual Studio (in the process of creating a new Entity Data Model): login failed for user 'sa'
body: <p>I know there are similar questions, but I have a specific problem.</p>
  
  <p><code>Microsoft Visual Studio (2017)</code> pops up this error when I try to create a DB connection for my <code>Entity Data Model</code></p>
  
  <blockquote>
    <p>The attempt to attach to the database failed with the following
    information: Login failed for user 'sa'.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/44yyS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/44yyS.png" alt="enter image description here"></a></p>
  
  <p>What I've already checked:</p>
  
  <p>1) The <code>sa</code> user's password <strong>hasn't expired</strong> or <strong>isn't different</strong> than what I have specified.</p>
  
  <p>2) The <code>sa</code> user <strong>has not been disabled</strong>, either by being denied permission to connect to the database engine nor having the login disabled.</p>
  
  <p>3) My instance of <code>SQL Server 2016 (Developer Edition)</code> <strong>is configured</strong> for <code>SQL authentication</code>.</p>
  
  <p>4) <strong>SQL Server is running</strong> and I also can connect to it by <code>SQL Server Management Studio (v17.1)</code> via <code>sa</code> and <code>Windows Authentication</code> as well.</p>
  
  <hr>
  
  <p>What the problem could be?</p>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I tried to create a DB connection, when adding <code>ADO.NET Entity Data Model -&gt; EF Designer from database -&gt; New Connection -&gt; Microsoft SQL Server Database File</code> (the SchoolDB.mdf wasn't attached to SQL Server... maybe this is the source of the problem)</p>