Home All Groups Group Topic Archive Search About

default database for scripts in SSMS

Author
28 Nov 2007 12:34 AM
Ed White
When I write a script in SSMS (I'm using SQL Server 2005), generally the
database that pops up in the pulldown window on the menu, and which the
script runs against (unless/until I change the pulldown selection), is the
master database.  I'm working with only one database I've created, and I
rarely run scripts against the master database, so is there an option to have
SSMS default to my database instead of the master database?
--
Ed

Author
28 Nov 2007 4:46 AM
Ben Nevarez
Change the user default database.  Go to Security, Logins, right-clik your
login and select default database.

Hope this helps,

Ben Nevarez
Senior Database Administrator
AIG SunAmerica



Show quote
"Ed White" wrote:

> When I write a script in SSMS (I'm using SQL Server 2005), generally the
> database that pops up in the pulldown window on the menu, and which the
> script runs against (unless/until I change the pulldown selection), is the
> master database.  I'm working with only one database I've created, and I
> rarely run scripts against the master database, so is there an option to have
> SSMS default to my database instead of the master database?
> --
> Ed

AddThis Social Bookmark Button