Sunday, March 25, 2012

default database for scripts in SSMS

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
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
"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

No comments:

Post a Comment