Wednesday, March 7, 2012

Log backup question.

1).How to restore the active log.
I backup the DB but didn't backup log .
Is there a way to apply the active log after restore the DB
2)How to backup an up-to-date log.
How to ensure the log is backuped right on time when the DB is crashed.
I am afraid ,even a scheduled log-backup with interval of 1 Min can't do
this
Thanks!!1)
No can do if db is in simple recovery mode. If db is in full recovery mode, see point 2. However, if you never
do log backup, and run in full recovery mode, log will never be truncated. So, recovery modes and whether you
do log backups go hand-in-hand.
2)
After the crash, do a log backup using the NO_TRUNCATE option.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Straight" <someone@.> wrote in message news:OVkPazELEHA.1120@.TK2MSFTNGP11.phx.gbl...
> 1).How to restore the active log.
> I backup the DB but didn't backup log .
> Is there a way to apply the active log after restore the DB
> 2)How to backup an up-to-date log.
> How to ensure the log is backuped right on time when the DB is crashed.
> I am afraid ,even a scheduled log-backup with interval of 1 Min can't do
> this
> Thanks!!
>|||TK;
for point 2, log backup NO_TRUNCATE, does this apply to any recovery model
in general ?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:esY$n5ELEHA.2532@.TK2MSFTNGP10.phx.gbl...
> 1)
> No can do if db is in simple recovery mode. If db is in full recovery
mode, see point 2. However, if you never
> do log backup, and run in full recovery mode, log will never be truncated.
So, recovery modes and whether you
> do log backups go hand-in-hand.
> 2)
> After the crash, do a log backup using the NO_TRUNCATE option.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Straight" <someone@.> wrote in message
news:OVkPazELEHA.1120@.TK2MSFTNGP11.phx.gbl...
> > 1).How to restore the active log.
> > I backup the DB but didn't backup log .
> > Is there a way to apply the active log after restore the DB
> > 2)How to backup an up-to-date log.
> > How to ensure the log is backuped right on time when the DB is crashed.
> > I am afraid ,even a scheduled log-backup with interval of 1 Min can't do
> > this
> >
> > Thanks!!
> >
> >
>|||Hi,
Only for Bulk_logged and FULL recovery models.
Thanks
Hari
MCDBA
"pohkeat" <pohkeat@.hotmail.com> wrote in message
news:usl0UTFLEHA.2244@.tk2msftngp13.phx.gbl...
> TK;
> for point 2, log backup NO_TRUNCATE, does this apply to any recovery model
> in general ?
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> message news:esY$n5ELEHA.2532@.TK2MSFTNGP10.phx.gbl...
> > 1)
> > No can do if db is in simple recovery mode. If db is in full recovery
> mode, see point 2. However, if you never
> > do log backup, and run in full recovery mode, log will never be
truncated.
> So, recovery modes and whether you
> > do log backups go hand-in-hand.
> >
> > 2)
> > After the crash, do a log backup using the NO_TRUNCATE option.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> >
> >
> > "Straight" <someone@.> wrote in message
> news:OVkPazELEHA.1120@.TK2MSFTNGP11.phx.gbl...
> > > 1).How to restore the active log.
> > > I backup the DB but didn't backup log .
> > > Is there a way to apply the active log after restore the DB
> > > 2)How to backup an up-to-date log.
> > > How to ensure the log is backuped right on time when the DB is
crashed.
> > > I am afraid ,even a scheduled log-backup with interval of 1 Min can't
do
> > > this
> > >
> > > Thanks!!
> > >
> > >
> >
> >
>

No comments:

Post a Comment