Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

Index Maintanance Plan - with DR site log shipping ( Off site )

Hello ,

I have set up a Index Maintenance plan that runs every Sunday that is using Ola Hallengren's  scripts. This works brilliantly except that it is increasing the LDf file ( which it does normally from Rebuilding index's where needed ) and for me to log ship this file would be 50 GB which if i had to do would take probably around  14 hours. I have also tried to use the "Sort In Tempdb" which i thought would use that instead but not still growing the LDF of database that is been indexed.

Can anyone please advise how i can keep log shipping going for this maintenance schedule, as i have to set up a agent job for DBCC SQLPERF (LOGSPACE) and   DBCC SHRINKDATABASE then copy the database after a backup to DR site.

Kind regards
D
0
deanmachine333
Asked:
deanmachine333
  • 2
1 Solution
 
Anthony PerkinsCommented:
I have set up a Index Maintenance plan that runs every Sunday that is using Ola Hallengren's  scripts
Why are you using the Index Maintenance Plans to run Ola Hallengren's Indexing scripts.  Ola's scripts are meant as a replacement of the Maintenance plans.

This works brilliantly except that it is increasing the LDf file
That would be because you are using the default Full Recovery Model and not backing up your Transaction Log.  You need to setup a job to do frequent Transaction Log backups using something like Ola's backup scripts.

Once you have that in place we can talk about doing a one-time only shrink of your Transaction Log.
0
 
deanmachine333Author Commented:
I have set up log shipping - so have the Transaction logs backing up while this is happening but it still bloats up the log files and then instead of the bak file being huge its the transaction log.

i have just bit the bullet and sending bak file across to DR site which takes a while but still works out smaller and quicker than using the trn files while the maintenance is happening.

thanks
0
 
deanmachine333Author Commented:
I have set up log shipping - so have the Transaction logs backing up while this is happening but it still bloats up the log files and then instead of the bak file being huge its the transaction log.

i have just bit the bullet and sending bak file across to DR site which takes a while but still works out smaller and quicker than using the trn files while the maintenance is happening.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now