Skip to content

Commit c23dc6a

Browse files
committed
System stored procedure refresh - phase 11
1 parent ee018f5 commit c23dc6a

File tree

40 files changed

+197
-173
lines changed

40 files changed

+197
-173
lines changed

docs/relational-databases/system-stored-procedures/sp-syspolicy-rename-condition-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Renames an existing condition in Policy-Based Management."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 08/21/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -68,7 +68,7 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
6868
The following example renames a condition that is named `Change Tracking Enabled`.
6969

7070
```sql
71-
EXEC msdb.dbo.sp_syspolicy_rename_condition
71+
EXECUTE msdb.dbo.sp_syspolicy_rename_condition
7272
@name = N'Change Tracking Enabled',
7373
@new_name = N'Verify Change Tracking Enabled';
7474
GO

docs/relational-databases/system-stored-procedures/sp-syspolicy-rename-policy-category-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Renames an existing policy category in Policy-Based Management."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 08/21/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -68,7 +68,7 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
6868
The following example renames a policy category that is named `Test Category 1` to `Test Category 2`.
6969

7070
```sql
71-
EXEC msdb.dbo.sp_syspolicy_rename_policy_category
71+
EXECUTE msdb.dbo.sp_syspolicy_rename_policy_category
7272
@name = N'Test Category 1',
7373
@new_name = N'Test Category 2';
7474
GO

docs/relational-databases/system-stored-procedures/sp-syspolicy-rename-policy-transact-sql.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Renames an existing policy in Policy-Based Management."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 08/21/2024
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -68,12 +68,12 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
6868
The following example renames a policy that is named `Test Policy 1` to `Test Policy 2`.
6969

7070
```sql
71-
EXEC msdb.dbo.sp_syspolicy_rename_policy
71+
EXECUTE msdb.dbo.sp_syspolicy_rename_policy
7272
@name = N'Test Policy 1',
7373
@new_name = N'Test Policy 2';
7474
GO
7575
```
7676

77-
## ## Related content
77+
## Related content
7878

7979
- [Policy-Based Management stored procedures (Transact-SQL)](policy-based-management-stored-procedures-transact-sql.md)

docs/relational-databases/system-stored-procedures/sp-syspolicy-repair-policy-automation-transact-sql.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Repairs policy automation in Policy-Based Management."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -54,8 +54,7 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
5454
The following example repairs policy automation.
5555

5656
```sql
57-
EXEC msdb.dbo.sp_syspolicy_repair_policy_automation;
58-
57+
EXECUTE msdb.dbo.sp_syspolicy_repair_policy_automation;
5958
GO
6059
```
6160

docs/relational-databases/system-stored-procedures/sp-syspolicy-set-config-enabled-transact-sql.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Enables or disables Policy-Based Management."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -59,8 +59,7 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
5959
The following example enables Policy-Based Management.
6060

6161
```sql
62-
EXEC msdb.dbo.sp_syspolicy_set_config_enabled @value = 1;
63-
62+
EXECUTE msdb.dbo.sp_syspolicy_set_config_enabled @value = 1;
6463
GO
6564
```
6665

docs/relational-databases/system-stored-procedures/sp-syspolicy-set-config-history-retention-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Specifies the number of days to keep policy evaluation history for
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -67,7 +67,7 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
6767
The following example sets the policy evaluation history retention to 28 days.
6868

6969
```sql
70-
EXEC msdb.dbo.sp_syspolicy_set_config_history_retention @value = 28;
70+
EXECUTE msdb.dbo.sp_syspolicy_set_config_history_retention @value = 28;
7171
GO
7272
```
7373

docs/relational-databases/system-stored-procedures/sp-syspolicy-set-log-on-success-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Specifies whether successful policy evaluations are logged in the
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -62,7 +62,7 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
6262
The following example enables the logging of successful policy evaluations.
6363

6464
```sql
65-
EXEC msdb.dbo.sp_syspolicy_set_log_on_success @value = 1;
65+
EXECUTE msdb.dbo.sp_syspolicy_set_log_on_success @value = 1;
6666
GO
6767
```
6868

docs/relational-databases/system-stored-procedures/sp-syspolicy-subscribe-to-policy-category-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Adds a policy category subscription for the specified database."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -60,7 +60,7 @@ The following example adds a subscription to the `Finance` policy category for t
6060
USE <database_name>;
6161
GO
6262

63-
EXEC sys.sp_syspolicy_subscribe_to_policy_category
63+
EXECUTE sys.sp_syspolicy_subscribe_to_policy_category
6464
@policy_category = N'Finance';
6565
GO
6666
```

docs/relational-databases/system-stored-procedures/sp-syspolicy-unsubscribe-from-policy-category-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Deletes a policy category subscription for the current database."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -59,7 +59,7 @@ The following example deletes a subscription to the `Finance` policy category fo
5959
```sql
6060
USE <database_name>;
6161
GO
62-
EXEC sys.sp_syspolicy_unsubscribe_from_policy_category
62+
EXECUTE sys.sp_syspolicy_unsubscribe_from_policy_category
6363
@policy_category = N'Finance';
6464
GO
6565
```

docs/relational-databases/system-stored-procedures/sp-syspolicy-update-policy-category-subscription-transact-sql.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Updates a policy category subscription for a specified database."
44
author: VanMSFT
55
ms.author: vanto
66
ms.reviewer: randolphwest
7-
ms.date: 06/26/2023
7+
ms.date: 06/23/2025
88
ms.service: sql
99
ms.subservice: system-objects
1010
ms.topic: "reference"
@@ -67,12 +67,12 @@ To obtain values for *@policy_category_subscription_id* and for *@policy_categor
6767

6868
```sql
6969
SELECT a.policy_category_subscription_id,
70-
a.target_type,
71-
a.target_object,
72-
b.name AS policy_category
70+
a.target_type,
71+
a.target_object,
72+
b.name AS policy_category
7373
FROM msdb.dbo.syspolicy_policy_category_subscriptions AS a
74-
INNER JOIN msdb.dbo.syspolicy_policy_categories AS b
75-
ON a.policy_category_id = b.policy_category_id;
74+
INNER JOIN msdb.dbo.syspolicy_policy_categories AS b
75+
ON a.policy_category_id = b.policy_category_id;
7676
```
7777

7878
## Permissions
@@ -86,7 +86,7 @@ Requires membership in the **PolicyAdministratorRole** fixed database role.
8686
The following example updates an existing policy category subscription so that the [!INCLUDE [sssampledbobject-md](../../includes/sssampledbobject-md.md)] database subscribes to the `Finance` policy category.
8787

8888
```sql
89-
EXEC msdb.dbo.sp_syspolicy_update_policy_category_subscription
89+
EXECUTE msdb.dbo.sp_syspolicy_update_policy_category_subscription
9090
@policy_category_subscription_id = 1,
9191
@target_object = 'AdventureWorks2022',
9292
@policy_category = 'Finance';

0 commit comments

Comments
 (0)