Wednesday, March 21, 2012

Saved SQL Queries

Can someone help me. In SQL Server 2005, when I save a query, and re-open it later, it always opens in the .master database. We do not use this database regularly, and I have to switch the database to the one that we use 95% of the time. Is there anyway to change the default database that opens, when I open these saved files for a given connection?


Thanks in advance for your help,


Wayne

You will have to include a USE statement within your database script to make the change. EVen the user defaultdb will not affect the connect to the master database.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||Thanks for the answer.

No comments:

Post a Comment