Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Server 2005 - Backup, Integrity Check and Index Optimization


SQL Server 2005 - Backup, Integrity Check and Index Optimization

Author
Message
Leeland
Leeland
SSC-Addicted
SSC-Addicted (458 reputation)SSC-Addicted (458 reputation)SSC-Addicted (458 reputation)SSC-Addicted (458 reputation)SSC-Addicted (458 reputation)SSC-Addicted (458 reputation)SSC-Addicted (458 reputation)SSC-Addicted (458 reputation)

Group: General Forum Members
Points: 458 Visits: 1319
After a nice conversation with Ola I think I understand his concept about the script and the reasons for the logic in some points. It does make sense and if you wanted to add notifications to certain aspects it would be easy to modify.

In my opinion it would depend on what you are comfortable with as far as relying on the script to make the correct decision depending on the situation or if you would like to be involved when something unplanned occurs so you can investigate.

Overall I can't believe he did such a nice job with the script and I look forward to trying to use if all works out.


Lee
Anish-1093520
Anish-1093520
SSC Veteran
SSC Veteran (226 reputation)SSC Veteran (226 reputation)SSC Veteran (226 reputation)SSC Veteran (226 reputation)SSC Veteran (226 reputation)SSC Veteran (226 reputation)SSC Veteran (226 reputation)SSC Veteran (226 reputation)

Group: General Forum Members
Points: 226 Visits: 126
I have been using this solution quite some time now, its super fantastic.

Regards,
Anish
webrunner
webrunner
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3031 Visits: 3755
This is a fantastic set of scripts. Thanks to Ola Hallengren for them!

I do have one question, though. I have tried setting the CleanupTime for the backup script to 24 (for 24 hours), yet the server is leaving 2 days' worth of backup files on the server. Should it not leave only 1 copy? Should I set the CleanupTime to 23 (or 25?) hours to leave only 1 day's backup on the server for each database? Sorry if I'm missing something obvious.

Thanks in advance for any help.

- webrunner

-------------------
"I love spending twice as long and working twice as hard to get half as much done!" – Nobody ever.
Ref.: http://www.adminarsenal.com/admin-arsenal-blog/powershell-how-to-write-your-first-powershell-script

"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Ola Hallengren
Ola Hallengren
SSC-Enthusiastic
SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)

Group: General Forum Members
Points: 172 Visits: 1938
I calculate the cleanup time before I start backing up the database. The reason for that is to protect against a scenario where you delete a backup that you have just performed. Please send me a mail (http://ola.hallengren.com/contact.html) if you are interested in more details on this.

Another thing is that you may have variations in the time when the backup finishes.

Because of these things you need to set the CleanupTime to 23 or 22 hours in your case.

Ola Hallengren
http://ola.hallengren.com
webrunner
webrunner
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3031 Visits: 3755
Ola Hallengren (6/11/2013)
I calculate the cleanup time before I start backing up the database. The reason for that is to protect against a scenario where you delete a backup that you have just performed. Please send me a mail (http://ola.hallengren.com/contact.html) if you are interested in more details on this.

Another thing is that you may have variations in the time when the backup finishes.

Because of these things you need to set the CleanupTime to 23 or 22 hours in your case.

Ola Hallengren
http://ola.hallengren.com


Many thanks, Ola. Setting the time to 23 hours seems to have worked. The backup job in question takes about 30 minutes, but that may have been enough time with the 24 setting to prevent deleting the older backup.

- webrunner

-------------------
"I love spending twice as long and working twice as hard to get half as much done!" – Nobody ever.
Ref.: http://www.adminarsenal.com/admin-arsenal-blog/powershell-how-to-write-your-first-powershell-script

"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Pete Softown
Pete Softown
SSC-Enthusiastic
SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)SSC-Enthusiastic (123 reputation)

Group: General Forum Members
Points: 123 Visits: 221
Just to say thanks for this script. It's been a couple of months that I've been using it on our many productions DB for index, stats, DBCC maintenance and it works great. I also like how much it is versatile and the logs.txt it makes!

w00t
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
Thank you for the scripts.

In the database integrity script, my script keeps failing, i did some research but i couldn't find anything online.

sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE Management.dbo.DatabaseIntegrityCheck @Databases = 'ALL_Databases', @CheckCommands = 'CHECKDB', @Execute = 'Y', @LogToTable = 'Y',@IncludeReadOnly ='Y',@PhysicalOnly='Y'" -b



Error:


Executed as user: Mydomain\User. The process could not be created for step 1 of job 0x29F90DA62C665F4EA2E83934C9DB33D7 (reason: The parameter is incorrect). The step failed.


What am i missing here?
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
After exchanging few emails with Ola, it is working now. It was a stupid mistake, in the job step the word sqlcmd should be in the first line, i had it on 3rd line :-P .
curious_sqldba
curious_sqldba
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 3573
DBconsistency check script has been working great. Hats off to you Smile.

I would like to make few recommendations, i feel there is a basic feature missing, script should be able to execute from where it stopped. I am imagining if this scripts stops on my 8 TB databases, and if i restart it again it would be a disaster for me Sad . This is what it is holding me up from deploying in production. For sure your script is very smart, it would be helpful if there are some detail comments Smile because i tend to review every script before i execute it. Thanks
Iwas Bornready
Iwas Bornready
SSCrazy Eights
SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)

Group: General Forum Members
Points: 8682 Visits: 885
Thanks for the script.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search