I have backup jobs running on a server with 3 instances.
Link to script: https://ola.hallengren.com/sql-server-backup.html
The solution I found for the other 2 servers with only once instance was to create a job which has the backup scripts as steps via TSQL and then simply runs the PowerShell script.
Is there a way to do this on a multi-instance server?
Server is running SQL Server 2012
Best Answer
You have a few options on how you could handle this...
workflow
that would iterate over each instance and call the backup job on each instance. Use aforeach -parallel
would allow all the jobs to start at one time. You would then need to script out a while loop to wait and see that all jobs have completed. Then the end of that PowerShell script just call the code you need to run.