Friday, February 24, 2012

Backup a mirrored database

I have a client who is worried about his backup strategy. He has two servers
and has succesfully setup mirroring. He wants to be able to automatically
backup databaseA before and after the mirror server becomes a principal.
What is the proper procedure to ensure that a backup job doesn't fail when
the roles of principal and mirror are reversed?
For example. On the principal, my client is doing a full backup on sun,
diff monday to sat and tlog backup every hour. On the mirror he has not
scheduled a backup. If the database fails on tuesday, the backup that would
normally run on the principal server will fail. The mirror server (which is
now the principal) currently doesn't have a backup scheduled. What is the
best practice?
Thanks for any help.
DanCreate the same job on both servers, both jobs are always enabled, and in the job you use the
sys.database_mirroring catalog view it see if the database is principal or mirror.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan Wood" <DanWood@.discussions.microsoft.com> wrote in message
news:F9A439EF-A131-450E-A032-12382AE9C782@.microsoft.com...
>I have a client who is worried about his backup strategy. He has two servers
> and has succesfully setup mirroring. He wants to be able to automatically
> backup databaseA before and after the mirror server becomes a principal.
> What is the proper procedure to ensure that a backup job doesn't fail when
> the roles of principal and mirror are reversed?
> For example. On the principal, my client is doing a full backup on sun,
> diff monday to sat and tlog backup every hour. On the mirror he has not
> scheduled a backup. If the database fails on tuesday, the backup that would
> normally run on the principal server will fail. The mirror server (which is
> now the principal) currently doesn't have a backup scheduled. What is the
> best practice?
> Thanks for any help.
> Dan|||Thanks for you help.
"Tibor Karaszi" wrote:
> Create the same job on both servers, both jobs are always enabled, and in the job you use the
> sys.database_mirroring catalog view it see if the database is principal or mirror.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Dan Wood" <DanWood@.discussions.microsoft.com> wrote in message
> news:F9A439EF-A131-450E-A032-12382AE9C782@.microsoft.com...
> >I have a client who is worried about his backup strategy. He has two servers
> > and has succesfully setup mirroring. He wants to be able to automatically
> > backup databaseA before and after the mirror server becomes a principal.
> > What is the proper procedure to ensure that a backup job doesn't fail when
> > the roles of principal and mirror are reversed?
> >
> > For example. On the principal, my client is doing a full backup on sun,
> > diff monday to sat and tlog backup every hour. On the mirror he has not
> > scheduled a backup. If the database fails on tuesday, the backup that would
> > normally run on the principal server will fail. The mirror server (which is
> > now the principal) currently doesn't have a backup scheduled. What is the
> > best practice?
> >
> > Thanks for any help.
> >
> > Dan
>

No comments:

Post a Comment