You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current script is designed to create SQL Agent Jobs that execute T-SQL commands. It achieves this by first populating an @Jobs table variable and then creating the jobs based on the data in that table.
For SQL Express, it would be beneficial if the script could automatically generate (or update) .cmd or .bat script files based on the commands in the @Jobs table. Furthermore, adding functionality to generate PowerShell commands to create Task Scheduler tasks for these scripts would enhance usability. This addition would enable the maintenance script to control the default timing and execution of the tasks seamlessly.
Another useful feature could be the option to group commands into sets. Commands within each group could then be executed sequentially. However, this might introduce complications with naming and execution management, so it may be a more advanced enhancement.
Recently, I configured these commands for an instance of SQL Express manually. To achieve this, I adjusted the primary script to generate the data for the @Jobs table and stored it in a persistent table. From there, I manually created the batch files and corresponding Task Scheduler tasks using the stored data. I found this approach easier than deciphering and generating the necessary commands from scratch using documentation.
Alternatively, creating stored procedures to execute command batches could simplify updates and maintenance further. This approach would provide a centralized mechanism for managing the execution flow while keeping the system easier to update over time.
The text was updated successfully, but these errors were encountered:
The current script is designed to create SQL Agent Jobs that execute T-SQL commands. It achieves this by first populating an @Jobs table variable and then creating the jobs based on the data in that table.
For SQL Express, it would be beneficial if the script could automatically generate (or update) .cmd or .bat script files based on the commands in the @Jobs table. Furthermore, adding functionality to generate PowerShell commands to create Task Scheduler tasks for these scripts would enhance usability. This addition would enable the maintenance script to control the default timing and execution of the tasks seamlessly.
Another useful feature could be the option to group commands into sets. Commands within each group could then be executed sequentially. However, this might introduce complications with naming and execution management, so it may be a more advanced enhancement.
Recently, I configured these commands for an instance of SQL Express manually. To achieve this, I adjusted the primary script to generate the data for the @Jobs table and stored it in a persistent table. From there, I manually created the batch files and corresponding Task Scheduler tasks using the stored data. I found this approach easier than deciphering and generating the necessary commands from scratch using documentation.
Alternatively, creating stored procedures to execute command batches could simplify updates and maintenance further. This approach would provide a centralized mechanism for managing the execution flow while keeping the system easier to update over time.
The text was updated successfully, but these errors were encountered: