Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari iniPelayar ini tidak lagi disokong.
Naik taraf kepada Microsoft Edge untuk memanfaatkan ciri, kemas kini keselamatan dan sokongan teknikal yang terkini.
Applies to:
SQL Server
Deletes a policy category subscription for a specific database.
Transact-SQL syntax conventions
sp_syspolicy_delete_policy_category_subscription
[ @policy_category_subscription_id = ] policy_category_subscription_id
[ ; ]
The identifier for the policy category subscription. @policy_category_subscription_id is int.
0
(success) or 1
(failure).
You must run sp_syspolicy_delete_policy_category_subscription
in the context of the msdb
system database.
You can't delete a policy category subscription when the subscription is mandated.
This stored procedure runs in the context of the current owner of the stored procedure.
To obtain values for @policy_category_subscription_id, you can use the following query:
SELECT a.policy_category_subscription_id,
a.target_object,
b.name AS category_name
FROM msdb.dbo.syspolicy_policy_category_subscriptions AS a
INNER JOIN msdb.dbo.syspolicy_policy_categories AS b
ON a.policy_category_id = b.policy_category_id;
The following example deletes a policy category subscription with an ID of 1.
EXEC msdb.dbo.sp_syspolicy_delete_policy_category_subscription
@policy_category_subscription_id = 1;
GO
Peristiwa
31 Mac, 11 PTG - 2 Apr, 11 PTG
Acara pembelajaran SQL, Fabric dan Power BI terbesar. 31 Mac - 2 April. Gunakan kod FABINSIDER untuk menjimatkan $400.
Daftar hari ini