Posts

Showing posts with the label SQL Server

Temporal tables in SQL

Image
SQL Server 2016 introduced support for temporal tables (also known as system-versioned temporal tables) as a database feature that brings built-in support for providing information about data stored in the table at any point in time rather than only the data that is correct at the current moment in time. Temporal is a database feature that was introduced in ANSI SQL 2011. Real data sources are dynamic and more often than not business decisions rely on insights that analysts can get from data evolution. Use cases for temporal tables include: ·          Auditing all data changes and performing data forensics when necessary ·          Reconstructing state of the data as of any time in the past ·          Calculating trends over time ·          Maintaining a slowly changing dimension for decision support applications · ...

SQL Server Row Level Security

Image
SQL Server Row Level Security Row-level security (RLS) is a feature added as of SQL Server 2016. Instead of encrypting or decrypting a database’s table data, it restricts and filters a table’s row-level data in accordance with security policies defined by the user. This enables the database engine to limit the number of exposed data rows. This is a simple and powerful SQL Server security control that is transparent to both clients and user applications. Permissions Creating, altering, or dropping security policies requires the ALTER ANY SECURITY POLICY permission. Creating or dropping a security policy requires ALTER permission on the schema. Additionally, the following permissions are required for each predicate that is added: ·          SELECT and REFERENCES permissions on the function being used as a predicate. ·          REFERENCES permission on the target table being bound to the policy...