How do I change the default database of a database login in SQL 2008?

How to change the default database on a SQL Server login:
  1. Grant the user with right to the database you want to set as the default database (see this Knowledge Base article)
  2. Connect to the database using SQL Server Management Studio with your primary sql login 
  3. Click New Query Button
  4. Execute the following command:

Alter login <loginname> with default_database = <name of default database>

Replace <loginname> and <name of default database> with the sql login name (primary or secondary) and database name respectively

Article ID: 184, Created On: 11/13/2008, Modified: 1/10/2012