Friday, March 30, 2012

Restore deleted table from log?

Hi,
If a table was deleted, is it possible to roll back the deletion with the
transaction log?
ThanksCheck out www.lumigent.com.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"BDB" <bdb@.reply.to.group.com> wrote in message
news:%23iSygiyYGHA.508@.TK2MSFTNGP02.phx.gbl...
Hi,
If a table was deleted, is it possible to roll back the deletion with the
transaction log?
Thanks|||Okay this is what I have:
BACKUP LOG mydb
TO DISK= 'mydblog200604180415.bak'
WITH NO_TRUNCATE, INIT
go
use master
go
RESTORE LOG mydb
FROM DISK= 'mydblog200604180415.bak'
WITH STOPAT = 'Apr 18, 2006 3:30 PM'
I get this error:
Msg 3117, Level 16, State 1, Line 2
The log or differential backup cannot be restored because no files are ready
to rollforward.
Msg 3013, Level 16, State 1, Line 2
RESTORE LOG is terminating abnormally.
Can anyone help?|||"BDB" <bdb@.reply.to.group.com> wrote in message
news:%23iSygiyYGHA.508@.TK2MSFTNGP02.phx.gbl...
> Hi,
> If a table was deleted, is it possible to roll back the deletion with the
> transaction log?
You can restore the database and then all logs up to the point in time just
before it was deleted.
If you mean recover the table w/o doing that, http://www.lumigent.com/ may
help.
> Thanks
>|||When you restore log, you first need to restore database, then the log backups, in order. I suggest
you read some in Books Online about backup and restore to get a grip on how this work. Also, you
might want to check out: http://www.karaszi.com/SQLServer/info_restore_log_several_times.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"BDB" <bdb@.reply.to.group.com> wrote in message news:%23$zI%23BzYGHA.428@.TK2MSFTNGP02.phx.gbl...
> Okay this is what I have:
> BACKUP LOG mydb
> TO DISK= 'mydblog200604180415.bak'
> WITH NO_TRUNCATE, INIT
> go
> use master
> go
> RESTORE LOG mydb
> FROM DISK= 'mydblog200604180415.bak'
> WITH STOPAT = 'Apr 18, 2006 3:30 PM'
> I get this error:
> Msg 3117, Level 16, State 1, Line 2
> The log or differential backup cannot be restored because no files are ready to rollforward.
> Msg 3013, Level 16, State 1, Line 2
> RESTORE LOG is terminating abnormally.
>
> Can anyone help?
>|||Just keep in mind the below point in the article to minimise impact on
production db.
* Restore into another database and copy the affected data into the
production database.
Thanks
Ajay Rengunthwarsql

No comments:

Post a Comment