Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Tail backup

Author  Topic 

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-11-10 : 19:58:21
In what circumtances can we recover the database to point of time failure?

I mean can we take the tail backup in every case(eg:-database is offline)


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-10 : 21:47:57
You can only take a final tlog backup if the database is available.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-11-10 : 22:03:32
Thanks for you reply Tkizer.

Can we take tail t-log using below command, if DB is offline also

backup log databasename
to disk='somepath\file'
with no_truncate;
go

OR

backup log databasename
to disk='somepath\file'
with continue_after_error;
go
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-10 : 22:21:28
If the database is not available, then no.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-11-10 : 22:30:16
That means we will be lose the active transations(transations from last tlog to failure). What are the other ways to achieve this other than logshipping? if i need point in time recovery

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2009-11-10 : 22:51:30
If the database can be safely detached, you could copy the data and log file(s) to another server and attach them. Assuming no file corruption you'd preserve all the transactions in the log. It's not a reliable technique though, just an option in case of emergency.

You could use database mirroring to provide another copy of the database, as well as replication. There are 3rd party software packages that provide (near) continuous replication of SQL Server data to another source, using various methods (log reader, disk reader, network packet duplication) as well as SAN hardware/software combinations that do block-level disk copying. None of these are technically backup solutions, but they could be used in concert with database backup techniques to reduce the loss window if your database goes offline.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-10 : 23:37:16
We use database mirroring and clustering for high availability. We backup our tlogs every 15 minutes.

Log shipping just provides another server to perform the restores. It does not allow you to backup the active transactions on the principle server in the case where a database is not available.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-11-12 : 10:22:30
quote:
Originally posted by tkizer

If the database is not available, then no.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."


I found below answer in forums that it is possible to take tail backup even db is offline

Providing the log is available, yes. If the log is damaged/missing then no. If it's just the mdf/ndf files that are damaged/missing/corrupt then yes.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-12 : 13:01:52
It is not possible to take a transaction log backup of a database that is offline. Try it yourself, you'll get this error:

quote:

Msg 942, Level 14, State 4, Line 1
Database 'Test' cannot be opened because it is offline.
Msg 3013, Level 16, State 1, Line 1
BACKUP LOG is terminating abnormally.





Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-12 : 13:18:04
Horse > Water > Drink

Something's wrong with that equation





Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-11-13 : 04:43:14
quote:
Originally posted by tkizer

It is not possible to take a transaction log backup of a database that is offline. Try it yourself, you'll get this error:



Agreed. I seem to have been quoted out of context in the OP's last message.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -