Database Reference
In-Depth Information
3.
The policy engine will then iterate through each stored procedure evaluable and the
check condition, here the PBM will record each object's evaluation as passed or
failed to report at the end of evaluation.
4.
Finally, the result of evaluation is committed/reported back into the policy store's
execution history tables to store the record of the evaluation.
The On Schedule execution mode components are similar to On Demand mode. However, the
On Schedule workflow is dependent on SQL Server Agent service that is essential to schedule
and execute a policy evaluation process. Whenever a policy is under evaluation using On
Schedule model, the following methods are used by PBM:
1.
The agent mechanizes the evaluation to trigger the loading of policy.
2.
The SQL Server engine employs the PowerShell provider based on the schedule, such
as every day at a certain time.
3.
The SQL Server Agent uses the PowerShell script to accomplish the steps for policy
evaluation, the step retrieves all the policies from the policy store to choose relevant
policies that were set to the scheduled agent job.
4.
Finally, the job is selected to execute the PowerShell command: Invoke-
PolicyEvaluation.cmdlet . This will load the policy into the database engine to
complete the entire process that is executed by the On Demand policy.
There's more...
F When SQL Server policy administrators use PBM, SSMS tool will showcase the
policy creation methods and other essential execution modes of PBM depending
upon the settings.
F The On Demand execution mode will evaluate the policy when directly specified by
the user.
F The policies that have On Schedule evaluation mode will use SQL Server agent jobs
that are owned by the sa login or logins, which are part of sysadmin server role.
Implementing and running PowerShell for
SQL Server features
Windows PowerShell is a powerful scripting tool that can help System Administrators to
manage the servers in an automated way using scripts. A .NET assembly contains Windows
PowerShell providers and CmdLets that extends the functionality of the shell. Similarly,
PowerShell for SQL Server is available from SQL Server 2008 version onwards. During the SQL
Server installation process, PowerShell and PowerShell snap-ins are installed to expose the
SQL Server functionality from PowerShell.
 
Search WWH ::




Custom Search