It's Not All About The Keys

  • Toreador (4/16/2014)


    SQLRNNR (4/15/2014)

    Every system has a sys.databases and that is what the question was referring to.

    No it isn't - the question clearly refers to [dbo].[databases]

    I know the script said [dbo].[databases]. But that was the point - to test your troubleshooting skills. The [databases] object intended (and therefore meant by the question) was in the sys schema. It is because of that common mistake that a lot of dbas and developers make that the error resulted.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (4/16/2014)


    The [databases] object intended (and therefore meant by the question) was in the sys schema.

    No it wasn't. According to the explanation it was in the dbo schema - but was a synonym for the sys view. I'm really not sure how we were meant to guess this!

    I actually got the answer correct but for the wrong reason - I skimmed over the 'dbo' bit and assumed it was the sys view, so thought it would fail because of this.

  • I'm falling in the camp that says the query was wrong, with the table on the left being the wrong table.

    If the query had been right it would have been a more intriguing question, but as it stands, just feel a bit... off.

  • Toreador (4/16/2014)


    SQLRNNR (4/16/2014)


    The [databases] object intended (and therefore meant by the question) was in the sys schema.

    No it wasn't. According to the explanation it was in the dbo schema - but was a synonym for the sys view. I'm really not sure how we were meant to guess this!

    I actually got the answer correct but for the wrong reason - I skimmed over the 'dbo' bit and assumed it was the sys view, so thought it would fail because of this.

    Jason says it was meant to refer to the view in the sys schema and that seems to be correct. But the question didn't bother to say that the thing in the dbo schema was a chinese copy of or a reference to the thing in the sys schema, so the question didn't say what it meant to say. Seems to me that it was silly carelesness to base the answer on some "fact" which not mentioned in the question. But that doesn't mean that the question wasn't intended to mean what it's author clearly (now that we've seen his answer and explanation) intended it to mean, just that he got it wrong.

    Tom

  • Good one, thanks! 🙂

Viewing 5 posts - 31 through 34 (of 34 total)

You must be logged in to reply to this topic. Login to reply