Deploy Scheduled Policies to Multiple Instances
By using Registered Servers, you can deploy scheduled policies to managed servers from a central location. You can deploy scheduled policies from either a local server group, or from a Central Management Server.
In this task, you will do the following:
Export the policies that you scheduled in the previous task to a folder.
Deploy the scheduled policies to target instances that are managed through Registered Servers.
You will perform these tasks on the computer where you completed the previous tasks in this lesson.
This task has the following prerequisites:
You must have completed the previous tasks in this lesson.
The instances where you want to deploy the scheduled policies must be running SQL Server 2008 or a later version. Automation requires the policies to be stored locally, which is not supported on versions of SQL Server earlier than SQL Server 2008.
The servers where you want to deploy the scheduled policies must be registered in Registered Servers in either the Local Server Groups or the Central Management Servers node. For more information, see the following topics:
To export the scheduled policies as .xml files
On the server where you configured scheduled policies in the previous task, expand Management, expand Policy Management, and then click Policies.
On the View menu, click Object Explorer Details.
in the Object Explorer Details pane, select all the scheduled best practices policies that you want to deploy to other servers through Registered Servers.
You can click the Category heading to sort the policies by category.
Right-click the selection, and then click Export Policy.
If you selected multiple policies to export, in the Browse For Folder dialog box, select a destination folder, or create a new folder. For this lesson, create a new folder with the path C:\Scheduled_BP_Policies, and then click OK.
If you only selected one policy to export, in the Export Policy dialog box, create a new folder with the path C:\Scheduled_BP_Policies, click Open, and then click Save.
The .xml policy files are created in the folder location.
To deploy the scheduled policies to servers that are managed through Registered Servers
On the View menu, click Registered Servers.
Expand Database Engine, expand either Local Server Groups or Central Management Servers, right-click the node that you want to deploy the policies to, and then click Import Policies.
If you right-click Local Server Groups or the Central Management Server itself, the policies will be deployed to all managed servers. If you right-click a specific server group, the policies will only be deployed to servers in that group. If you right-click a specific registered server, the policies will only be deployed to that server.
Next to Files to import, click the ellipsis button (…).
In the Select Policy dialog box, browse to the folder location where you saved the scheduled policies. For this example, browse to the location C:\Scheduled_BP_Policies.
Select the policies that you want to import to the target instances, and then click Open.
In the Import dialog box, in the Policy state list, select the desired policy state. You can choose to preserve the policy state, enable, or disable the policies on import. Be aware that the policies must be enabled to run on a schedule.
Click OK to import the policies to all the target instances.
If there are any errors, the Import dialog box does not disappear. Click the Log page to review the messages. Click Cancel to close the dialog box.
To view the policies from a target instance, connect to the instance, open Object Explorer, expand Management, and then expand Policies. You should see the imported policies in the Policies node. If you double-click each policy, you can view the schedule, or change the settings.
To view the evaluation results after a scheduled policy runs, open the Policy History log on the target instance. To open the log, right-click Policy Management, and then click View History.
This tutorial is finished. To return to the start, see Tutorial: Evaluating Best Practices Using Policy-Based Management.
To see a complete list of tutorials, click Tutorials.