Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234

SQL Server 2005 - Backup, Integrity Check and Index Optimization Expand / Collapse
Author
Message
Posted Thursday, March 17, 2011 9:53 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 10:16 AM
Points: 417, Visits: 1,144
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
Post #1079810
Posted Wednesday, March 13, 2013 4:10 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, February 21, 2014 12:01 AM
Points: 226, Visits: 126
I have been using this solution quite some time now, its super fantastic.

Regards,
Anish
Post #1430283
Posted Monday, June 10, 2013 2:44 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 12:24 PM
Points: 2,600, Visits: 3,109
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


-------------------
"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
Post #1461778
Posted Tuesday, June 11, 2013 8:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, July 26, 2015 11:19 AM
Points: 172, Visits: 1,924
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
Post #1462168
Posted Tuesday, June 11, 2013 8:44 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 12:24 PM
Points: 2,600, Visits: 3,109
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


-------------------
"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
Post #1462186
Posted Friday, March 21, 2014 10:07 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, July 20, 2015 12:39 PM
Points: 77, Visits: 124
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!

Post #1553582
Posted Thursday, June 11, 2015 12:21 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 10:18 AM
Points: 1,329, Visits: 3,120
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?
Post #1693781
Posted Friday, June 12, 2015 2:57 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 10:18 AM
Points: 1,329, Visits: 3,120

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 .
Post #1694310
Posted Saturday, July 4, 2015 11:14 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 10:18 AM
Points: 1,329, Visits: 3,120

DBconsistency check script has been working great. Hats off to you :).

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 . 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 :) because i tend to review every script before i execute it. Thanks
Post #1700268
« Prev Topic | Next Topic »

Add to briefcase «««1234

Permissions Expand / Collapse