Categories
SQL Tutorials

Change Default Database in SQL Server Management Studio

Change your login name and database name and Execute following SP:

Exec sp_defaultdb @loginame='imsatasia\Rahul', @defdb='DBName'

OR

  • Go to “Object Explorer > Security > Logins”
  • Right click your Login and click on “Properties”
  • Under General Section, you can change Default Database value in drop down called “Default Database”

Set Default Database Name in SQL Server