Udostępnij za pośrednictwem


View or Modify the Properties of a Policy-Based Management Policy

This topic describes how to view or modify a Policy-Based Management policy's properties in SQL Server 2012 by using SQL Server Management Studio or Transact-SQL.

In This Topic

  • Before you begin:

    Security

  • To view or modify a policy's properties, using:

    SQL Server Management Studio

    Transact-SQL

Before You Begin

Security

Permissions

Requires membership in the PolicyAdministratorRole role in the msdb database.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using SQL Server Management Studio

To view the properties of all policies on an object

  1. In Object Explorer, right-click a server, server object, database, or database object, point to Policies and select View. For more information on the available options in the View Policies – object_name dialog box, see View Policies Dialog Box.

  2. When finished, click Close.

To view or modify a specific policy's properties

  1. In Object Explorer, click the plus sign to expand the server that contains the Policy-Based Management policy that you want to view or modify.

  2. Click the plus sign to expand the Management folder.

  3. Click the plus sign to expand Policy Management.

  4. Click the plus sign to expand the Policies folder.

  5. Right-click the policy that you want to view or modify and select Properties. For more information on the available options in the Open Policy – policy_name dialog box, see Create New Policy or Open Policy Dialog Box, General Page and Create New Policy or Open Policy Dialog Box, Description Page.

  6. When finished, click OK.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using Transact-SQL

To view a policy's properties

  1. In Object Explorer, connect to an instance of Database Engine.

  2. On the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute.

    USE msdb;
    GO
    SELECT name,
       execution_mode,
       description,
       is_enabled,
       job_id
    FROM syspolicy_policies;
    GO
    

For more information, see syspolicy_policies (Transact-SQL).

Ikona strzałki używana z łączem Powrót na górę strony[Top]