Showing posts with label live. Show all posts
Showing posts with label live. Show all posts

Tuesday, March 20, 2012

Recover from a nuked database

One of our apps has accidently nuked one of our live databases and for
some reason our last backup was 1 month ago
It will have done a drop schema then re-created the schema and added 2
test records
Is there any way of rolling back the database to the point before the
drop + create ?
The MDF and LDF are still the same size which means the logs are
intact
AdamWhat recovery model?
If simple, you are most probably toast.
If full, you might be able to do BACKUP LOG, then restore the most recent da
tabase backups and all
subsequent log backups where you specify STOPAT for the most recent log back
up. This assumes that
you have an unbroken chain of log records (didn't do things like BACKUP LOG
.. WITH TRUNCATE ONLY).
You could also check out some of the log reader tools and see if they can mi
ne out of the
transaction log, but of course they are totally dependent on the log records
being in the
transaction log.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Adam // Internetware" <internetware@.gmail.com> wrote in message
news:1184081055.300348.184120@.22g2000hsm.googlegroups.com...
> One of our apps has accidently nuked one of our live databases and for
> some reason our last backup was 1 month ago
> It will have done a drop schema then re-created the schema and added 2
> test records
> Is there any way of rolling back the database to the point before the
> drop + create ?
> The MDF and LDF are still the same size which means the logs are
> intact
> Adam
>|||On Jul 10, 4:31 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:[vbcol=seagreen]
> What recovery model?
> If simple, you are most probably toast.
> If full, you might be able to do BACKUP LOG, then restore the most recent
database backups and all
> subsequent log backups where you specify STOPAT for the most recent log ba
ckup. This assumes that
> you have an unbroken chain of log records (didn't do things like BACKUP LO
G ... WITH TRUNCATE ONLY).
> You could also check out some of the log reader tools and see if they can
mine out of the
> transaction log, but of course they are totally dependent on the log recor
ds being in the
> transaction log.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asph
ttp://sqlblog.com/blogs/tibor_karaszi
> "Adam // Internetware" <internetw...@.gmail.com> wrote in messagenews:11840
81055.300348.184120@.22g2000hsm.googlegroups.com...
>
>
>
>
>
Looks like I'm Ok the Redgate log rescue seems to have picked up most
of the transaction log so I think I can rollback - give or take some
issues with FK's
Thx
Adam

Recover from a nuked database

One of our apps has accidently nuked one of our live databases and for
some reason our last backup was 1 month ago
It will have done a drop schema then re-created the schema and added 2
test records
Is there any way of rolling back the database to the point before the
drop + create ?
The MDF and LDF are still the same size which means the logs are
intact
Adam
What recovery model?
If simple, you are most probably toast.
If full, you might be able to do BACKUP LOG, then restore the most recent database backups and all
subsequent log backups where you specify STOPAT for the most recent log backup. This assumes that
you have an unbroken chain of log records (didn't do things like BACKUP LOG ... WITH TRUNCATE ONLY).
You could also check out some of the log reader tools and see if they can mine out of the
transaction log, but of course they are totally dependent on the log records being in the
transaction log.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Adam // Internetware" <internetware@.gmail.com> wrote in message
news:1184081055.300348.184120@.22g2000hsm.googlegro ups.com...
> One of our apps has accidently nuked one of our live databases and for
> some reason our last backup was 1 month ago
> It will have done a drop schema then re-created the schema and added 2
> test records
> Is there any way of rolling back the database to the point before the
> drop + create ?
> The MDF and LDF are still the same size which means the logs are
> intact
> Adam
>
|||On Jul 10, 4:31 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:[vbcol=seagreen]
> What recovery model?
> If simple, you are most probably toast.
> If full, you might be able to do BACKUP LOG, then restore the most recent database backups and all
> subsequent log backups where you specify STOPAT for the most recent log backup. This assumes that
> you have an unbroken chain of log records (didn't do things like BACKUP LOG ... WITH TRUNCATE ONLY).
> You could also check out some of the log reader tools and see if they can mine out of the
> transaction log, but of course they are totally dependent on the log records being in the
> transaction log.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "Adam // Internetware" <internetw...@.gmail.com> wrote in messagenews:1184081055.300348.184120@.22g2000hsm.go oglegroups.com...
>
>
Looks like I'm Ok the Redgate log rescue seems to have picked up most
of the transaction log so I think I can rollback - give or take some
issues with FK's
Thx
Adam

Recover from a nuked database

One of our apps has accidently nuked one of our live databases and for
some reason our last backup was 1 month ago
It will have done a drop schema then re-created the schema and added 2
test records
Is there any way of rolling back the database to the point before the
drop + create ?
The MDF and LDF are still the same size which means the logs are
intact
AdamWhat recovery model?
If simple, you are most probably toast.
If full, you might be able to do BACKUP LOG, then restore the most recent database backups and all
subsequent log backups where you specify STOPAT for the most recent log backup. This assumes that
you have an unbroken chain of log records (didn't do things like BACKUP LOG ... WITH TRUNCATE ONLY).
You could also check out some of the log reader tools and see if they can mine out of the
transaction log, but of course they are totally dependent on the log records being in the
transaction log.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Adam // Internetware" <internetware@.gmail.com> wrote in message
news:1184081055.300348.184120@.22g2000hsm.googlegroups.com...
> One of our apps has accidently nuked one of our live databases and for
> some reason our last backup was 1 month ago
> It will have done a drop schema then re-created the schema and added 2
> test records
> Is there any way of rolling back the database to the point before the
> drop + create ?
> The MDF and LDF are still the same size which means the logs are
> intact
> Adam
>|||On Jul 10, 4:31 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> What recovery model?
> If simple, you are most probably toast.
> If full, you might be able to do BACKUP LOG, then restore the most recent database backups and all
> subsequent log backups where you specify STOPAT for the most recent log backup. This assumes that
> you have an unbroken chain of log records (didn't do things like BACKUP LOG ... WITH TRUNCATE ONLY).
> You could also check out some of the log reader tools and see if they can mine out of the
> transaction log, but of course they are totally dependent on the log records being in the
> transaction log.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "Adam // Internetware" <internetw...@.gmail.com> wrote in messagenews:1184081055.300348.184120@.22g2000hsm.googlegroups.com...
> > One of our apps has accidently nuked one of our live databases and for
> > some reason our last backup was 1 month ago
> > It will have done a drop schema then re-created the schema and added 2
> > test records
> > Is there any way of rolling back the database to the point before the
> > drop + create ?
> > The MDF and LDF are still the same size which means the logs are
> > intact
> > Adam
Looks like I'm Ok the Redgate log rescue seems to have picked up most
of the transaction log so I think I can rollback - give or take some
issues with FK's
Thx
Adam

Friday, March 9, 2012

Recover data from Database Transaction Log

Hi Everyone
I have a problem with one of our databases. One of our developers run a
query on a live database which resulted in the deletion of several records
in a group of tables. No database Backup is available for the data erased
and so comes my question, is there any way of rolling back those
transactions from the database logs?
Thanks in advance for your attentionJohn Grisham wrote:
> Hi Everyone
> I have a problem with one of our databases. One of our developers run a
> query on a live database which resulted in the deletion of several records
> in a group of tables. No database Backup is available for the data erased
> and so comes my question, is there any way of rolling back those
> transactions from the database logs?
> Thanks in advance for your attention
>
What recovery model?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||The idea is to recover the lost data in any way from a detached database,
and later re introduce the recovered data in the live database. The erased
records correspond to tariff data fro some products and offer variations
during the whole year 2006.
Thanks in advance...
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AD3FF2.1060900@.realsqlguy.com...
> John Grisham wrote:
> What recovery model?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||John Grisham wrote:
> The idea is to recover the lost data in any way from a detached database
,
> and later re introduce the recovered data in the live database. The erased
> records correspond to tariff data fro some products and offer variations
> during the whole year 2006.
>
Again, what recovery model? Simple, Bulk-Logged, or Full?
If Full, you should be able to take a backup of the database, followed
by a log backup, then use the STOPAT clause of the RESTORE command to
restore the database and log to a point just prior to the deletion.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||The recovery model is set to simple.
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AD4361.6090506@.realsqlguy.com...
> John Grisham wrote:
> Again, what recovery model? Simple, Bulk-Logged, or Full?
> If Full, you should be able to take a backup of the database, followed by
> a log backup, then use the STOPAT clause of the RESTORE command to restore
> the database and log to a point just prior to the deletion.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||John Grisham wrote:
> The recovery model is set to simple.
>
Not much you can do then... Backup, backup, backup, it can't be said
enough times... You really should read up on the various recovery
models, and understand how they can benefit you.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Ok, thanks for your attention and kind advice
Regards
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AE2968.9070106@.realsqlguy.com...
> John Grisham wrote:
> Not much you can do then... Backup, backup, backup, it can't be said
> enough times... You really should read up on the various recovery models,
> and understand how they can benefit you.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com

Recover data from Database Transaction Log

Hi Everyone
I have a problem with one of our databases. One of our developers run a
query on a live database which resulted in the deletion of several records
in a group of tables. No database Backup is available for the data erased
and so comes my question, is there any way of rolling back those
transactions from the database logs?
Thanks in advance for your attention
John Grisham wrote:
> Hi Everyone
> I have a problem with one of our databases. One of our developers run a
> query on a live database which resulted in the deletion of several records
> in a group of tables. No database Backup is available for the data erased
> and so comes my question, is there any way of rolling back those
> transactions from the database logs?
> Thanks in advance for your attention
>
What recovery model?
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||The idea is to recover the lost data in any way from a detached database,
and later re introduce the recovered data in the live database. The erased
records correspond to tariff data fro some products and offer variations
during the whole year 2006.
Thanks in advance...
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AD3FF2.1060900@.realsqlguy.com...
> John Grisham wrote:
> What recovery model?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
|||John Grisham wrote:
> The idea is to recover the lost data in any way from a detached database,
> and later re introduce the recovered data in the live database. The erased
> records correspond to tariff data fro some products and offer variations
> during the whole year 2006.
>
Again, what recovery model? Simple, Bulk-Logged, or Full?
If Full, you should be able to take a backup of the database, followed
by a log backup, then use the STOPAT clause of the RESTORE command to
restore the database and log to a point just prior to the deletion.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||The recovery model is set to simple.
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AD4361.6090506@.realsqlguy.com...
> John Grisham wrote:
> Again, what recovery model? Simple, Bulk-Logged, or Full?
> If Full, you should be able to take a backup of the database, followed by
> a log backup, then use the STOPAT clause of the RESTORE command to restore
> the database and log to a point just prior to the deletion.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
|||John Grisham wrote:
> The recovery model is set to simple.
>
Not much you can do then... Backup, backup, backup, it can't be said
enough times... You really should read up on the various recovery
models, and understand how they can benefit you.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Ok, thanks for your attention and kind advice
Regards
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AE2968.9070106@.realsqlguy.com...
> John Grisham wrote:
> Not much you can do then... Backup, backup, backup, it can't be said
> enough times... You really should read up on the various recovery models,
> and understand how they can benefit you.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com

Recover data from Database Transaction Log

Hi Everyone
I have a problem with one of our databases. One of our developers run a
query on a live database which resulted in the deletion of several records
in a group of tables. No database Backup is available for the data erased
and so comes my question, is there any way of rolling back those
transactions from the database logs?
Thanks in advance for your attentionJohn Grisham wrote:
> Hi Everyone
> I have a problem with one of our databases. One of our developers run a
> query on a live database which resulted in the deletion of several records
> in a group of tables. No database Backup is available for the data erased
> and so comes my question, is there any way of rolling back those
> transactions from the database logs?
> Thanks in advance for your attention
>
What recovery model?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||The idea is to recover the lost data in any way from a detached database,
and later re introduce the recovered data in the live database. The erased
records correspond to tariff data fro some products and offer variations
during the whole year 2006.
Thanks in advance...
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AD3FF2.1060900@.realsqlguy.com...
> John Grisham wrote:
>> Hi Everyone
>> I have a problem with one of our databases. One of our developers run a
>> query on a live database which resulted in the deletion of several
>> records in a group of tables. No database Backup is available for the
>> data erased and so comes my question, is there any way of rolling back
>> those transactions from the database logs?
>> Thanks in advance for your attention
> What recovery model?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||John Grisham wrote:
> The idea is to recover the lost data in any way from a detached database,
> and later re introduce the recovered data in the live database. The erased
> records correspond to tariff data fro some products and offer variations
> during the whole year 2006.
>
Again, what recovery model? Simple, Bulk-Logged, or Full?
If Full, you should be able to take a backup of the database, followed
by a log backup, then use the STOPAT clause of the RESTORE command to
restore the database and log to a point just prior to the deletion.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||The recovery model is set to simple.
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AD4361.6090506@.realsqlguy.com...
> John Grisham wrote:
>> The idea is to recover the lost data in any way from a detached
>> database, and later re introduce the recovered data in the live database.
>> The erased records correspond to tariff data fro some products and offer
>> variations during the whole year 2006.
> Again, what recovery model? Simple, Bulk-Logged, or Full?
> If Full, you should be able to take a backup of the database, followed by
> a log backup, then use the STOPAT clause of the RESTORE command to restore
> the database and log to a point just prior to the deletion.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||John Grisham wrote:
> The recovery model is set to simple.
>
Not much you can do then... Backup, backup, backup, it can't be said
enough times... You really should read up on the various recovery
models, and understand how they can benefit you.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Ok, thanks for your attention and kind advice
Regards
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message
news:45AE2968.9070106@.realsqlguy.com...
> John Grisham wrote:
>> The recovery model is set to simple.
> Not much you can do then... Backup, backup, backup, it can't be said
> enough times... You really should read up on the various recovery models,
> and understand how they can benefit you.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com