• Derek Dongray (4/18/2008)


    Kelsey Thornton (4/18/2008)


    come on, Derek. 😉

    Why would you try running a query about system objects in a database other than master?

    Habit. 🙂

    Novices start by firing up SSMS and running every query in 'master'. After they've cluttered up the master database on their development server, they realise that perhaps they should create another database (or maybe even two or three) for applications and testing.;)

    I agree with Kelsey, if you're querying system objects you would use master. If you're querying backup & restore history you would use msdb.

    Think of Sutton's Law: The law is named after the bank robber Willie Sutton, who supposedly answered a reporter inquiring why he robbed banks by saying "because that's where the money is."

    OTOH if you are actually creating new objects for testing, a separate test db makes perfect sense.