Row Level Security Updates

  • Comments posted to this topic are about the item Row Level Security Updates

  • Shouldn't the policy send the username column like this?

    CREATE SECURITY POLICY rls_CustomerFilter

    ADD FILTER PREDICATE dbo.rls_customer_check(username)

    ON dbo.CustomerAccessList;

    GO

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (3/28/2016)


    Shouldn't the policy send the username column like this?

    CREATE SECURITY POLICY rls_CustomerFilter

    ADD FILTER PREDICATE dbo.rls_customer_check(username)

    ON dbo.CustomerAccessList;

    GO

    I had a similar question. I guessed that it would get an error because of the type mismatch...

  • yes, sorry. Typo corrected. That's what I get for trying to type code in here instead of copy/paste.

  • Nice question,

    It's very like the question 11 days go. Are you trying to din this into us by repetition? (If so, good on you!)

    Tom

  • TomThomson (3/28/2016)


    Nice question,

    It's very like the question 11 days go. Are you trying to din this into us by repetition? (If so, good on you!)

    More just trying to get people aware of the limits and functionality. Look for a few more across the next couple months.

  • The question is imprecisely worded. In the question does not mention that the bsmith user has rights to insert/update the table.

    Last time it was there.

  • George Vobr (3/28/2016)


    The question is imprecisely worded. In the question does not mention that the bsmith user has rights to insert/update the table.

    Last time it was there.

    Started with the correct answer then changed my mind for the same reason hmm.

    ...

  • Steve Jones - SSC Editor (3/28/2016)


    TomThomson (3/28/2016)


    Nice question,

    It's very like the question 11 days go. Are you trying to din this into us by repetition? (If so, good on you!)

    More just trying to get people aware of the limits and functionality. Look for a few more across the next couple months.

    One thing I really appreciate about the QOTD is that it exposes people to things they haven't used before, like this question. Learning something new is a good way to start the day, so thank you.

  • Steve Jones - SSC Editor (3/28/2016)


    yes, sorry. Typo corrected. That's what I get for trying to type code in here instead of copy/paste.

    Copy/paste can be just as dangerous. I've seen so many pieces of code where it was not modified correctly after the copy/paste, especially when it comes to correcting the alias names.

  • Very interesting QotD.

    It works only on SQL Server 2016, even though it's "documented" for SQL 2014.

    In documentation for version 2014 https://msdn.microsoft.com/en-us/library/dn765131(v=sql.120).aspx

    it says Row-Level Security is now available in SQL Server 2016. which is wrong.

    Igor Micev,My blog: www.igormicev.com

  • Easy one, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 12 posts - 1 through 11 (of 11 total)

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