title: What is the login name for windows authentication mode in sql server 2008 r2?
body: <p>I am using sql server 2008 R2 and in 1 scenario i need to change the default database from "master" to the "Test" as soon as i click on the New Query it will select default database to "Test". for this i am using following query to change the database priority,</p>
  
  <pre><code>Exec sp_defaultdb @loginame='sa',@defdb='Test'
  </code></pre>
  
  <p>i am able to change the default database to Test for sa Login but i wanted to change it in the Windows authentication mode i am connecting database using (local).
  can any one know about what is the default user when we do login to the SSMS using Windows Authentication Mode. or any other solution to change the priority of database to Test?.
  Thanks! in advanced.</p>