-
-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install-DbaMaintenanceSolution - Add auto-scheduling #8911
Conversation
I'll try to have a look this weekend. Just some days ago Brent blogged about his configuration: https://www.brentozar.com/archive/2023/05/how-to-configure-ola-hallengrens-database-maintenance-scripts-for-backups/ |
Thank you! Ola also added some suggestions to his FAQ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this idea! Makes sense to me - only concern for me would be the check db running at Saturday at 10:45:00 AM.
I think a lot of businesses this would still be considered as business hours, even though it's a satuday?
It was challenging to figure out what should go where without overlap. One night is heavy IO with backups, then there's the integrity checks then I didn't want to encroach too much upon Friday bc that's when some people closeout and run stuff so this seemed like a reasonable compromise that would allow their week-end stuff to run. But overall, this is just an approximation for the general weekday crowd and weekenders can modify as needed. |
i have to publish dbatools so this branch will be 2.0.2 |
I seem to cant find information about autoscheduling in the documentation yet. /Fredrik |
thank you! looking into it now |
there we go, thanks for the ping! https://docs.dbatools.io/Install-DbaMaintenanceSolution |
Adds auto scheduling. By default, when
-AutoScheduleJobs WeeklyFull
is used and if no other jobs are running at 1:15 AM, this is the schedule it makes:I decided to run the Weekly Clean and Purge at the same time bc it's not very impactful.
Index Optimization is 2.5 hours earlier (on Saturday night) than the full backups which will start at 1:15 AM on Sunday morning. Integrity checks start 12 hours earlier than that at 10:45 AM. I'm open to suggestions here.
Diffs run every night except the night that Fulls are made 👍🏼
You can change the start time if you wish then the subtractions will occur from that start time. Oh, and if anything is scheduled at 1:15 AM on Sunday, it'll keep trying for an open slot each hour until it finds it. So the next try will be at 2:15 AM, then 3:15 AM, etc.
I have to merge this by tomorrow, and will need to add tests and documentation but I wanted to do an earlier PR in case anyone wanted to review it.