Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How running a program or PowerShell script, after the "SQL Server Maintenance" plan ended?

I need to execute/launch a PowerShell script after my maintenance plan did some work on my database.

Is this possible?

like image 634
scmbgx Avatar asked Jan 28 '26 01:01

scmbgx


1 Answers

You can run your PowerShell script within SQL Server 2008/2008r2/2012 Agent. In SQL Server Management Studio create a SQL job and select a PowerShell job step specifying the full path to your PowerShell script. Then add the job at the end of your maintenance plan as 'Execute SQL Server Agent Job Task'

like image 97
CB. Avatar answered Jan 30 '26 19:01

CB.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!