default schema trouble

  • Comments posted to this topic are about the item default schema trouble

  • Nice question, I knew it wasn't as simple as I first thought, and while I chose the correct answer I didn't want it to be correct. 😉

  • Thanks for the question.

    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

  • nice question.

    got to know something new today... thanks 🙂

  • Good question. I was wondering if the admin role had an impact. Apparently it did. Thanks.:-)

  • Thanks for the question. I've done a lot work with schemas, so I was confident in my selection of the answer. The interesting part of this QoD for me was the execute as login='qotd' statement. Didn't know this one and I'm now kicking myself for how much time I could have saved in the past if I had known this. This one is going in my personal "tips" cheat-sheet.

    Cindy

  • Cindy, glad to hear that you got something out of the qotd even if you knew the answer to the actual question 🙂

  • Soon as I hit the submit button, knew I was wrong. I've been working alot lately with schema specific tables and when I saw that the select statement had no schema prefix, of course I thought I'd get an error.

    Stupid. Oh well. Good question

    The distance between genius and insanity is measured only by success.

  • Good one.

    execute as Login is new to me. Hadn't tried as of yet, but would definitely suggest developers to use this while working with multiple schemas.

    SQL DBA.

  • that was a real thinker, got it wrong, but learned someth9ing new. thanks!

  • I thought I might get it wrong, but not only was I wrong, but for the wrong reason. Learned something. Thanks for the question.

    I shocked that no one has chimed in with a gripe that the Server Version wasn't mentioned, or any default configurations.

    Dan

  • Very good question. I guess the moral of the story is to always be precise and specify the full path to any object in order to avoid "default" assumptions. Boy, I've made this mistake before. 🙂

  • I did not notice the Sysadmin role. Gotta' read the whole question I guess.

  • Great question! That's the kind of issue that would cause the loss of much hair if I'd have to figure it out in a production environment.

    Rob Schripsema
    Propack, Inc.

  • I'll be sincere: I didn't know exactly what to choose.

    I got it right after some time thinking but my reason was different from the answer. 😀

    I guess I'm just lucky.

    And maybe the "EXECUTE AS LOGIN" deserve an article?

    Thanks a lot. Very tricky.:hehe:

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

Viewing 15 posts - 1 through 15 (of 18 total)

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