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


Application Roles


Application Roles

Author
Message
Joshua M Perry
Joshua M Perry
Mr or Mrs. 500
Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)

Group: General Forum Members
Points: 576 Visits: 549
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-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39652 Visits: 38560
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
Mr or Mrs. 500
Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)Mr or Mrs. 500 (576 reputation)

Group: General Forum Members
Points: 576 Visits: 549
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
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1848 Visits: 463
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-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39652 Visits: 38560
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)
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12361 Visits: 18574
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