Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server 2016 (13.x) and later versions
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
SQL database in Microsoft Fabric
Returns a row for each security policy in the database.
Column name | Data type | Description |
---|---|---|
name | sysname | Name of the security policy, unique within the database. |
object_id | int | ID of the security policy. |
principal_id | int | ID of the owner of the security policy, as registered to the database. NULL if the owner is determined via the schema. |
schema_id | int | ID of the schema where the object resides. |
parent_object_id | int | ID of the object to which the policy belongs. Must be 0. |
type | vachar(2) | Must be SP. |
type_desc | nvarchar(60) | SECURITY_POLICY. |
create_date | datetime | UTC date the security policy was created. |
modify_date | datetime | UTC date the security policy was last modified. |
is_ms_shipped | bit | Always false. |
is_enabled | bit | Security policy specification state: 0 = disabled 1 = enabled |
is_not_for_replication | bit | Policy was created with the NOT FOR REPLICATION option. |
uses_database_collation | bit | Uses the same collation as the database. |
is_schemabinding_enabled | bit | Schemabinding state for the security policy: 0 or NULL = enabled 1 = disabled |
Principals with the ALTER ANY SECURITY POLICY permission have access to all objects in this catalog view as well as anyone with VIEW DEFINITION on the object.
Row-Level Security
sys.security_predicates (Transact-SQL)
CREATE SECURITY POLICY (Transact-SQL)
Security Catalog Views (Transact-SQL)
Catalog Views (Transact-SQL)
Principals (Database Engine)
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today