Help! I just accidentally dropped a table in the database. How can I restore it?
Provided you have a full backup and or a series of backups (starting with
afull backup, maybe a differential and a series of tranlogs) of your
database prior to the deletion you can do this:
1) Perform a transaction log backup.
2) Restore the database starting with the full backup and then using the
STOPAT option when you restore from the tranlog backup taking in step one.
You would STOPAT the point in time just prior to when you deleted the table.
----
Need SQL Server Examples check out my website at
http://www.geocities.com/sqlserverexamples
"Waldemar" <anonymous@.discussions.microsoft.com> wrote in message
news:8E9F47E4-57D7-4498-9E97-9BEEB1AFC4AB@.microsoft.com...
> Help! I just accidentally dropped a table in the database. How can I
restore it?
|||Waldemar,
In addition to Greg's suggestion, check out "log explorer" in
www.lumigent.com
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Waldemar" <anonymous@.discussions.microsoft.com> wrote in message
news:8E9F47E4-57D7-4498-9E97-9BEEB1AFC4AB@.microsoft.com...
> Help! I just accidentally dropped a table in the database. How can I
restore it?
|||What can I do if I do not have a full backup, only a copy of yesterday's database?
|||Hi Waldemar,
What is recovery model set for your database. STOPAT (POINT_IN_RECOVERY)
will only work if your recover model is FULL.
If it is full then you can go ahead with the option specified by "Gregory"
to do a point in time recovery.
Steps:-
1. Take a transaction log backup.
2. Restore the yesterdays full database backup to a new database with
"norecovery" option
3. Restore the trsnaction log backup to the new database with "RECOVERY" and
STOPAT option.
If your recovery model is SIMPLE or BULK_Logged then , you can get the data
only till last day
1. Restore the yesterdays fulll database backup to a new database
2. Pick the data available in the table and load it to actual database
3. This case u loose the data after the last backup till data loss.
Thanks
Hari
MCDBA
"Gregory A. Larsen" <greg.larsen@.netzero.com> wrote in message
news:edev0d3PEHA.624@.TK2MSFTNGP11.phx.gbl...
> Provided you have a full backup and or a series of backups (starting with
> afull backup, maybe a differential and a series of tranlogs) of your
> database prior to the deletion you can do this:
> 1) Perform a transaction log backup.
> 2) Restore the database starting with the full backup and then using the
> STOPAT option when you restore from the tranlog backup taking in step one.
> You would STOPAT the point in time just prior to when you deleted the
table.
> --
> ----
--
> ----
--
> --
> Need SQL Server Examples check out my website at
> http://www.geocities.com/sqlserverexamples
> "Waldemar" <anonymous@.discussions.microsoft.com> wrote in message
> news:8E9F47E4-57D7-4498-9E97-9BEEB1AFC4AB@.microsoft.com...
> restore it?
>
|||You can restore that backup into a new database name and copy the table from there into your production
database. Watch out for dependencies, though!
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Waldemar" <anonymous@.discussions.microsoft.com> wrote in message
news:795D7014-4206-426C-927B-C62E1C1A43F4@.microsoft.com...
> What can I do if I do not have a full backup, only a copy of yesterday's database?
|||If you only have a copy of the data files, you might try to sp_attach_db
using a different name. If the attach works, then you can simple insert
select to get the data moved.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Waldemar" <anonymous@.discussions.microsoft.com> wrote in message
news:795D7014-4206-426C-927B-C62E1C1A43F4@.microsoft.com...
> What can I do if I do not have a full backup, only a copy of yesterday's
database?
No comments:
Post a Comment