The Unusable User

  • duplicate post.

  • Thanks for the question.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • sestell1 (3/26/2014)


    Toreador (3/26/2014)


    It's possible that he is in the wrong context, but we'll assume based on the intro that he is in the correct place.

    Nope, based on the preamble

    first confirming the login exists on the instance and then finding that it does not exist in the database used by the application

    it's clear that although he's in the right context, he's checked the wrong database by mistake.

    😉

    I agree, being in the wrong database seemed like a much more likely scenario to me.

    Especially since there was no use statement preceding the command.

    Had the command included a use statement for the appropriate database, then I would have assumed the more obscure answer since there was no mention of a database restore.

    I think this statment at the end of the second paragraph indicates that the script was run in the right context...

    "...He runs this script in the application database:"

    Therefore, the only correct answer is the the Certificate / Asymmetric key.

    Thanks for the great question Andy, these last two have been challenging to the brain so early in the morning.

    J DBA

  • J DBA (3/26/2014)

    I think this statment at the end of the second paragraph indicates that the script was run in the right context...

    "...He runs this script in the application database:"

    Therefore, the only correct answer is the the Certificate / Asymmetric key.

    Thanks for the great question Andy, these last two have been challenging to the brain so early in the morning.

    J DBA

    Ah, good point. 😎

  • SQLRNNR (3/26/2014)


    Thanks Andy. I enjoy this style of questions you have been doing.

    +1, I have really enjoyed these questions as well.

  • Had no idea as I do not do a lot with logins. Good question. Definitely learned something today!

  • Tim, that's a good suggestion/point, that was un-intentional. I try to remember every word (or lack of) matters but its easy to miss something!

  • Interesting question, thanks.

    Hope this helps...

    Ford Fairlane
    Rock and Roll Detective

  • That was a very interesting question. It a process of elimination to get it down to 2 possibilities and the coffee made me wonder if the database context was it, but that would have been too easy. Thanks.

  • There is also the possibility that a different user name is mapped to the login and this account is orphaned. When the script in the question is run an error "The login already has an account under a different user name." is given.

  • It took me over an hour on Sunday... Thanks for the question, Andy!

  • I don't think it's a good question, or rather I don't think the answer and its explanation fit the question as stated.

    The explanation says "Theodore confirmed the user was not in the database" clearly intending to say repeat what the question said, and the reasoning that delivers the answer is clearly based on that. But what the question says is "first confirming the login exists on the instance and then finding that it does not exist in the database" which says nothing about the user, so we can't deduce from the question that the user in was absent from the database. The fact that someone made an unauthorised change to security is clearly stated, and that unauthorised change could easily have ended up with this username being orphaned (if someone accidentally deleted the login instead of some similar-looking login-name, realised their mistake, and thought that recreating this login and deleting the one that was supposed to be deleted would fix their error, teh user being oprphaned is exactly what would have happened: that seems more likely than someone coming along and deleting the user, while leaving the login alone, and not realising that they'd deleted the wrong user (because the fact that the right user was still there instead of deleted would surely be noticed, and then they would have recreated the wrongly deleted user).

    If the question had actually said what the answer and its explanation clearly indicate that it meant, instead of something different in a crucial detail, it would have been a good question. As it is, the question and the explanation don't match, a different answer is the more likely one of the two possible answers to the question as stated, and almost twice as many people have chosen that mst probably correct answer as have chosen the one erroneously claimed to be the only correct answer.

    Tom

Viewing 12 posts - 16 through 26 (of 26 total)

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