Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Application Roles Expand / Collapse
Author
Message
Posted Wednesday, March 19, 2008 10:28 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 7:34 PM
Points: 23,302, Visits: 32,056
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.




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)
Post #471704
Posted Wednesday, March 19, 2008 10:36 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, February 6, 2014 9:39 AM
Points: 420, Visits: 487
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.usesage.com
Post #471711
Posted Wednesday, March 19, 2008 11:22 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 7:34 PM
Points: 23,302, Visits: 32,056
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.




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)
Post #471744
Posted Wednesday, March 19, 2008 11:49 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, February 6, 2014 9:39 AM
Points: 420, Visits: 487
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.usesage.com
Post #471773
Posted Wednesday, March 19, 2008 11:54 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 11:08 AM
Points: 1,371, Visits: 385
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.



Post #471782
Posted Wednesday, March 19, 2008 11:59 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 7:34 PM
Points: 23,302, Visits: 32,056
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.




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)
Post #471789
Posted Wednesday, March 19, 2008 12:13 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 5:24 PM
Points: 7,139, Visits: 15,191
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?
Post #471806
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse