Microsoft SQL Server 2005 Management Studio.

Setting the default database in Microsoft SQL Server 2005 Management Studio.

When selecting a query, I got the wrong database in the "SQL Server" toolbar each time :

Fig. 1. The SQL Server toolbar with the default database (VGBA_ONT, in this case)

Select another default database using the Object Explorer window (select Security, Logins)

Fig 2. Selecting Properties for your login-id.

Fig 3. The Login Properties Dialog box contains the default database.