DB Mirroring and maintenance plans

  • How do other people handle their maintenance plans when using DB mirroring? Currently we have two servers, one being the primary server and the other providing a warm standby.

    I wanted to make the change over from the primary to the standby as easy as possible so was looking at writing a couple of batch files to handle the different failovers.

    One part that isn't mirrored however is the maintenance plans, I was looking at how to share the same plan between different servers as I don't seem to be able to create a maintenance plan on the mirror server for the databases that are "restoring". So what do other people do? I was considering just scripting the backups myself, does this sound like the best plan or does anyone here know of a better method?

  • We aren't using mirroring, but for our log shipping targets I scripted out the maintenance jobs and created them on the target server, but disabled them.  In case we need to fail over, I just need to enable the jobs...

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/

  • That's what I thought, seems simpler than trying to get the maintenance plan copied, found a way to get the script the maintenance plan generates the other day, so that will save a bit of time.

  • Store the MP packages in MSDB and restore the MSDB when you failover so that you will get all jobs alerts and schedules and MPs all together...

     

    MohammedU
    Microsoft SQL Server MVP

  • I was trying to avoid having to perform things like restores on failover so that the other server is ready to stand in almost right away.

  • I can not create a plan at all on my 64 bit mirrored. I will post this now as a separate question on this forum

    Regards,Yelena Varsha

  • Yelena: Check your tools are installed in Program files folder and also check SSIS installation...

    Chris: You want to avoid retores when failover happens but what the the jobs and alerts and SSIS packages ects...are you scripting them and creating them on destination server at the time of failover?

     

    MohammedU
    Microsoft SQL Server MVP

  • That's what I was looking into, as it seems I can't script the maintenance plans. Thus it seems like I don't want to use them anymore, but instead script the backups myself so they can be deployed on both servers easily.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply