Sample Header Ad - 728x90

How can I share values in maintenance plan tasks?

0 votes
1 answer
138 views
A simple example would be a maintenance plan that clears a directory of old files and create some copy backups of all databases on that instance to that same directory. This is run daily The first cleanup step contains the path where the files are deleted. The second step actually creates the copy backups in the same directory as the first step. So any changes made to the path have to be done in multiple places. For a simple 2 step maintenance plan this is not really a big issue but could be for more complicated plans. So is there a way that plan steps can share information? I don't necessarily mean passing information between steps but perhaps a global space of the steps? I could not see anything in the toolbox that would work for this. Best I got is that I could add two new steps. 1. Create a temp table with the path (and any other constants.) 2. Using that path delete directory contents 3. Run copy-backups 4. Delete temp table I had thought this question: https://dba.stackexchange.com/questions/120498/can-i-pass-data-between-stages-in-a-maintenance-task would have helped but it was focused on sending completion information in email.
Asked by Matt (365 rep)
Mar 17, 2017, 01:03 PM
Last activity: Aug 7, 2025, 01:01 AM