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?
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.
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