Built-in Row-Level Security in SQL Server 2016
Row-Level Security in SQL Server 2016
Microsoft development team has been widely focused on Built-in Raw-Level Security (RLS) programmability feature in SQL Server 2016 that centralises our row access logic within the database. Raw-Level Security enables customers to fine-grained access control to rows in a database table based on the characteristics of the user executing a query.
Before introduction of Row-Level Security, customer come-up with different solutions to implement Row-Level Security. For that, one hand they were using SQL views and other hand we have custom application code but both solutions contain problems because-
SQL views are decentralised where we need to create view on the top of each data table that we want to protect and spreading our access logic all over the place and also susceptible to runtime errors. It has become difficult to maintain during app upgrades also.
In Custom application code also became difficult to maintain as code base grows and access logic is separated from the data because multiple applications are accessing and referencing the same database and we need to re-implement the access logic.