Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am about to setup Ola Hallengrens database maintenance plan. We have our database mirrored and I was just wanting to know if I need to run the script on both my Sql Server instances or only the primary?

share|improve this question

migrated from stackoverflow.com Mar 4 at 14:24

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 20 down vote accepted

I recommend that you have the jobs enabled and scheduled on both servers and with the same configurations. Databases that are in a mirror role will automatically be skipped. There are checks for that in the script.

share|improve this answer
4  
Thanks for chiming in and confirming. Appreciate your excellent scripts :-) –  Kin Mar 4 at 19:25
5  
Do you really think you're qualified to speak on this matter? ;) –  billinkc Mar 4 at 19:25
    
Can someone verify the authenticity of this user? –  Kermit Mar 4 at 19:33
2  
@OlaHallengren - sorry for the misunderstanding. We were just so excited to see you here that we turned into primary school kids. –  swasheck Mar 5 at 15:14
1  
@swasheck Speak for yourself, but I was more excited than a little school girl. –  Kermit Mar 5 at 15:18

For now just run it on the Primary database server.

When you do a failover, you can run it on the mirrored server.

e.g when you deploy it on mirrored server, you (refer to: http://ola.hallengren.com/sql-server-backup.html)

EXECUTE dbo.DatabaseBackup
@Databases = 'SYSTEM_DATABASES', -- when failover, change it to ALL
@Directory = 'C:\Backup',
@BackupType = 'LOG',
@Verify = 'Y',
@ChangeBackupType = 'Y',
@CleanupTime = 24
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.