References Permission

  • Comments posted to this topic are about the item References Permission

    Ron K.

    "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -- Martin Fowler

  • There's a HUGE difference between "Allows the owner of another table to use columns in the table to which they've been granted that permission" (the supposedly "correct" answer to this QotD), and "allows the owner of another table to use columns in the table to which they've been granted that permission as the target of a REFERENCES FOREIGN KEY constraint with his or her table" (the actual correct answer, included in the explanation but not available as an answer - emphasis added by me).

    Please correct the question, as this may be very confusing for people who just check the questions and answers without actually checking the complete explanation as well.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • The first choice is also correct:

    From BOL:

    The REFERENCES permission on a table is needed in order to create a FOREIGN KEY constraint that references that table.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Hugo Kornelis (7/23/2008)


    There's a HUGE difference between "Allows the owner of another table to use columns in the table to which they've been granted that permission" (the supposedly "correct" answer to this QotD), and "allows the owner of another table to use columns in the table to which they've been granted that permission as the target of a REFERENCES FOREIGN KEY constraint with his or her table" (the actual correct answer, included in the explanation but not available as an answer - emphasis added by me).

    Please correct the question, as this may be very confusing for people who just check the questions and answers without actually checking the complete explanation as well.

    Agreed. REFERENCES is about referential integrity. The word "use" could be interpreted as "SELECT or UJPDATE". Very poor wording.

    Tom Moreau

    SQL Server MVP

  • I agree with Hugo.

    Another poorly worded answer. C'mon, I teach this stuff and know it. I want my point.

    Yes, I'm being a crybaby. I still want my point.

    I'm even willing to put up with the ton of email I'll get because others will post also, and not directly replying to my post, either.

    Diana

  • My profuse Apologies!

    It was a topic I ran across which I hadn't seen before and thought it would make a good question, so submitted it as such without having a full understanding of what I was reading.

    Dr. Dee, I'd give you your point if I could, maybe I should attend one of your classes!

    Ron K.

    "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." -- Martin Fowler

  • Answers altered, points awarded back to date. Thanks for the corrections.

  • Thanks for the question. Since we mostly work with SQL Server 2000 and use dbo only, we have never used the REFERENCES permission so far. This might change in the future though if we move on to 2K5 or 2K8.

    Unfortunately, the REFERENCES permission is not really well documented. My looks into BOL did not reveal much valuable information.

    Btw, REFERENCES is also used for XML Schemas

    The REFERENCE permission authorizes the principal to use the XML schema collection to type or constrain xml type columns, in tables and views and parameters. The REFERENCE permission is also required when one XML schema collection refers to another.

    As well as for assemblies http://searchwindowssecurity.techtarget.com/news/article/0,289142,sid45_gci1062083,00.html

    These are just two examples.

    Best Regards,

    Chris Büttner

  • Good question. Thanks for the correction.:)

Viewing 9 posts - 1 through 8 (of 8 total)

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