title: Cannot open database <db_name> requested by the login.The login failed
body: <p>I know this might be a duplicate questions but I checked all the answers provided and none of them worked for me.</p>
  
  <p>My applications (both winform and asp.net) were working fine with the way I worked with them but now all of a sudden none of them will connect to the local sqlserver database.</p>
  
  <p>I am using this connection string (both hard coded or using the web.config in asp.net applications) : </p>
  
  <p><code>Data Source=.;Initial Catalog=&lt;my_db_name&gt;;Integrated Security=True;</code></p>
  
  <p>but now I get this <code>SqlException</code> since this morning:</p>
  
  <p><code>Cannot open database &lt;my_db_name&gt; requested by the login. The login failed.Login failed for user '&lt;my_computer's_username\my_computer's_username-pc'&gt;.</code></p>
  
  <p>again I know this been asked a lot of times but almost none of the answers were for a <code>ConnectionString</code> with <code>integrated security = true</code> and for the few ones that were, the answers didn't work for me.</p>
  
  <p>ps1:right now there's a login under username <code>dbo</code> with <code>&lt;my_computer's_username\my_computer's_username-pc'&gt;</code> as its login in my database</p>
  
  <p>ps2:I can successfully login to my database with windows security option in sqlserver managment studio 2014</p>