May 29, 2014 at 5:37 pm
Interesting question, I learned something new from this one. Quite good mental exercise, as there's no useful documentation that I could find and I'd never used this function.
Some of the options are a bit obvious - user names don't have to be in domain user account format because I can run reporting services on a stand alone server that's not part of a domain, it probably won't have to be called in the master database because that would be unwieldy, and it is certainly going to return a user id if the user exists. It also seems pretty likely that a separate check will be needed to see if any subscriptions are owned by that user id. So that left me with two options - returning a non-null id for a non-existent user and the user being removed from RS when removed from active directory, and one of them had to be right and the other wrong. returning an id for a non-existent seemed pretty bizarre, but removing the user automatically would leave the question of what happened to reports or subscriptions owned by the user; I couldn't find any documentation that gave the answer, and didn't think of looking at the function's code or trying an an experiment. If I'd though a bit harder I'd have realised that choosing to orphan reports and subscriptions would be pretty horrid, as would just deleting them, and transferring them to the right new owner by magic isn't feasible so the bizarre behaviour must be it, but instead I leapt for the unwarranted idea that Reporting Services wouldn't do something bizarre so I picked the wrong option.
Tom
May 30, 2014 at 8:09 am
Nice walk through of the logic that got you there. I try to do that when I'm writing it too. Getting the right mix of answers is tough!
May 30, 2014 at 11:48 am
Mighty (5/26/2014)
Not really happy with the wording of the answers.I left the first option out, because the second option seemed "supersede" the first option.
I feel the same way.
- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply