You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DENY { SELECT | EXECUTE } ON [ sys.]system_object TO principal
32
-
```
33
-
33
+
DENY { SELECT | EXECUTE } ON [ sys. ] system_object TO principal
34
+
```
35
+
34
36
## Arguments
35
-
[**sys.**]
36
-
The **sys** qualifier is required only when you are referring to catalog views and dynamic management views.
37
-
38
-
*system_object*
39
-
Specifies the object on which permission is being denied.
40
-
41
-
*principal*
42
-
Specifies the principal from which the permission is being revoked.
43
-
44
-
## Remarks
45
-
This statement can be used to deny permissions on certain stored procedures, extended stored procedures, table-valued functions, scalar functions, views, catalog views, compatibility views, INFORMATION_SCHEMA views, dynamic management views, and system tables that are installed by [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. Each of these system objects exists as a unique record in the resource database (**mssqlsystemresource**). The resource database is read-only. A link to the object is exposed as a record in the **sys** schema of every database.
46
-
47
-
Default name resolution resolves unqualified procedure names to the resource database. Therefore, the **sys** qualifier is only required when you are specifying catalog views and dynamic management views.
48
-
37
+
38
+
#### [ sys. ]
39
+
40
+
The `sys` qualifier is required only when you're referring to catalog views and dynamic management views.
41
+
42
+
#### *system_object*
43
+
44
+
Specifies the object on which permission is being denied.
45
+
46
+
#### *principal*
47
+
48
+
Specifies the principal from which the permission is being revoked.
49
+
50
+
## Remarks
51
+
52
+
This statement can be used to deny permissions on certain stored procedures, extended stored procedures, table-valued functions, scalar functions, views, catalog views, compatibility views, `INFORMATION_SCHEMA` views, dynamic management views, and system tables that are installed by [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)]. Each of these system objects exists as a unique record in the resource database (`mssqlsystemresource`). The resource database is read-only. A link to the object is exposed as a record in the `sys` schema of every database.
53
+
54
+
Default name resolution resolves unqualified procedure names to the resource database. Therefore, the `sys` qualifier is only required when you're specifying catalog views and dynamic management views.
55
+
49
56
> [!CAUTION]
50
-
> Denying permissions on system objects will cause applications that depend on them to fail. [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] uses catalog views and may not function as expected if you change the default permissions on catalog views.
51
-
52
-
Denying permissions on triggers and on columns of system objects is not supported.
53
-
54
-
Permissions on system objects will be preserved during upgrades of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
55
-
56
-
System objects are visible in the [sys.system_objects](../../relational-databases/system-catalog-views/sys-system-objects-transact-sql.md) catalog view. The permissions on system objects are visible in the [sys.database_permissions](../../relational-databases/system-catalog-views/sys-database-permissions-transact-sql.md) catalog view in the **master** database.
57
-
58
-
The following query returns information about permissions of system objects:
59
-
57
+
> Denying permissions on system objects causes applications that depend on them to fail. [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] uses catalog views and might not function as expected, if you change the default permissions on catalog views.
58
+
59
+
Denying permissions on triggers and on columns of system objects isn't supported.
60
+
61
+
Permissions on system objects are preserved during [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] upgrades.
62
+
63
+
System objects are visible in the [sys.system_objects](../../relational-databases/system-catalog-views/sys-system-objects-transact-sql.md) catalog view. The permissions on system objects are visible in the [sys.database_permissions](../../relational-databases/system-catalog-views/sys-database-permissions-transact-sql.md) catalog view in the `master` database.
64
+
65
+
The following query returns information about permissions of system objects:
66
+
60
67
```sql
61
-
SELECT*FROMmaster.sys.database_permissions AS dp
62
-
JOINsys.system_objectsAS so
63
-
ONdp.major_id=so.object_id
64
-
WHEREdp.class=1ANDso.parent_object_id=0 ;
65
-
GO
66
-
```
67
-
68
-
## Permissions
69
-
Requires CONTROL SERVER permission.
70
-
71
-
## Examples
72
-
The following example denies `EXECUTE` permission on `xp_cmdshell` to `public`.
73
-
68
+
SELECT*
69
+
FROMmaster.sys.database_permissions AS dp
70
+
INNER JOINsys.system_objectsAS so
71
+
ONdp.major_id=so.object_id
72
+
WHEREdp.class=1
73
+
ANDso.parent_object_id=0;
74
+
GO
75
+
```
76
+
77
+
## Permissions
78
+
79
+
Requires `CONTROL SERVER` permission.
80
+
81
+
## Examples
82
+
83
+
The following example denies `EXECUTE` permission on `xp_cmdshell` to **public**.
0 commit comments