Table of Contents

Class CompatibilitySchema.Protect

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.sysprotects (Transact-SQL)

Applies to: √ SQL Server (all supported versions)

Contains information about permissions that have been applied to security accounts in the database by using the GRANT and DENY statements.

important


This SQL Server 2000 system table is included as a view for backward compatibility. We recommend that you use the current SQL Server system views instead. To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.


See sys.sysprotects.

[Table(Schema = "sys", Name = "sysprotects", IsView = true)]
public class CompatibilitySchema.Protect
Inheritance
CompatibilitySchema.Protect
Extension Methods

Properties

Action

Can have one of the following permissions:

26 = REFERENCES

178 = CREATE FUNCTION

193 = SELECT

195 = INSERT

196 = DELETE

197 = UPDATE

198 = CREATE TABLE

203 = CREATE DATABASE

207 = CREATE VIEW

222 = CREATE PROCEDURE

224 = EXECUTE

228 = BACKUP DATABASE

233 = CREATE DEFAULT

235 = BACKUP LOG

236 = CREATE RULE

[Column("action")]
[Nullable]
public byte? Action { get; set; }

Property Value

byte?

Columns

Bitmap of columns to which these SELECT or UPDATE permissions apply.

Bit 0 = All columns.

Bit 1 = Permissions apply to that column.

NULL = No information.

[Column("columns")]
[Nullable]
public byte[]? Columns { get; set; }

Property Value

byte[]

Grantor

User ID of the user that issued the GRANT or DENY permissions. Overflows or returns NULL if the number of users and roles exceeds 32,767.

[Column("grantor")]
[Nullable]
public short? Grantor { get; set; }

Property Value

short?

ID

ID of the object to which these permissions apply.

[Column("id")]
[NotNull]
public int ID { get; set; }

Property Value

int

Protecttype

Can have the following values:

204 = GRANT_W_GRANT

205 = GRANT

206 = DENY

[Column("protecttype")]
[Nullable]
public byte? Protecttype { get; set; }

Property Value

byte?

UID

ID of user or group to which these permissions apply. Overflows or returns NULL if the number of users and roles exceeds 32,767.

[Column("uid")]
[Nullable]
public short? UID { get; set; }

Property Value

short?