SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Application Roles


Application Roles

Author
Message
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)

Group: General Forum Members
Points: 96467 Visits: 38981
Yes, you invoke the approle is vague, but purposeful. Put yourself in the position asked. If you are testing an application role, how would you invoke it? Would you do it with or without using a cookie? I put myself in that position, guess what, I'm going to set it up so I can revert. It's vague, but if you think about it, the question is asking how can you get back to your original state. There are TWO ways, disconnect and reconnect or sp_unsetapprole. You, as the individual doing the testing get to setup how that happens.

Cool

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Joshua M Perry
Joshua M Perry
SSC Eights!
SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)

Group: General Forum Members
Points: 812 Visits: 551
The questions still says:

You are testing an application role in SQL Server 2005. You connect with SSMS, invoke the role, and then execute various queries and stored procedures. What can you do to return to your normal account permissions?

If the questions said:

You are testing an application role in SQL Server 2005. You connect with SSMS, invoke the role with the cookie option, and then execute various queries and stored procedures. What can you do to return to your normal account permissions?

then the answer would have been correct. As database administrators, we deal with many different application configurations. Saying that you can revert using sp_unsetapprole without first setting the cookie is like saying you can code against the CLR without first setting the CLR to enabled. You need to follow the proper steps for everything to work.

If I were to tell someone that they can just run sp_setapprole and the run sp_unsetapprole to revert to their original context, I would have a very upset developer when he could not revert.

Joshua Perry
http://www.greenarrow.net
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)

Group: General Forum Members
Points: 96467 Visits: 38981
The question was vague, make some assumptions. Again, how would YOU invoke the application role to accomplish testing of the role? How many ways can you invoke the application role? Given the various ways it can be done, what ways are available to revert to the original context? Given all the available options that can be used, there are, therefore two ways to revert back; disconnect and reconnect and sp_unsetapprole.

Cool

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Joshua M Perry
Joshua M Perry
SSC Eights!
SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)SSC Eights! (812 reputation)

Group: General Forum Members
Points: 812 Visits: 551
A database administrator's primary job is to protect the data. Making assumptions is a very good way to put the data at risk. Like Sgt. Joe Friday used to say in Dragnet, "All we want are the facts, ma'am". I deal in facts and data, not assumptions and generalities.

Joshua Perry
http://www.greenarrow.net
Mark D Powell
Mark D Powell
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2137 Visits: 466
I agree with Joshua. If a non-default setting was chosen when the role was set this should have been specified either in the question on in the answer by specifing that the cookie was set. This is another example of a poorly designed question.
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)SSC Guru (96K reputation)

Group: General Forum Members
Points: 96467 Visits: 38981
I don't think the question was poorly worded. The question was, in my opinion, written to make you think, what are the possible answers? How many ways can something be done? Using the statement, invoke the application role, how many ways can it be invoked? Based on that, how many ways can you revert back to the original context? This is elementary problem solving.

I will agree, that there have been some questions that have been poorly written and/or actually had no correct answers. This isn't one of them, IMHO.

Cool

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Matt Miller (4)
Matt Miller (4)
One Orange Chip
One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)One Orange Chip (29K reputation)

Group: General Forum Members
Points: 29949 Visits: 19009
Agreed - I don't think this was badloy worded, especially keeping in mind that wording a question so that the answer is essentially given to you defeats the purpose.

Finally - a question posed with no stated assumptions (IMHO) should be reviewed with no stated assumptions. There's nothing in the wording pointing towards HOW it was invoked (with or without the default settings), so I'm not sure how you could jump there. As a matter of fact - making a "hidden assumption" would make the question substantially more unfair. Again - in my opinion...

----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search