WHEN I REINSTALLED MSDE THE MSQL7/DATA FOLDER HAS MYDB.MDF AND MYDB.LDF FILES IN THERE.
THE NEW INSTALLATION WILL NOT RECOGNISE THESE FROM THE OLD INSTALLATION.
IS THERE ANY WAY TO REINSTATE THESE DBS OTHER THAN FROM THE BACK UP THAT I DID NOT DO?
HOPING AND PRAYING IN YOUR HANDS O LORD GURU.
Hi Lofty,
You can "reattach" the database. Take a look at the sp_attach_db stored proc
in BOL.
Basically, you can just say:
sp_attach_db 'newdbname','pathtomdffile','pathtoldsfile'
HTH,
Greg Low (MVP)
MSDE Manager SQL Tools
www.whitebearconsulting.com
"LOFTY" <anonymous@.discussions.microsoft.com> wrote in message
news:57943C4F-8CC8-4CB8-AC3F-C5B097662168@.microsoft.com...
> WHEN I REINSTALLED MSDE THE MSQL7/DATA FOLDER HAS MYDB.MDF AND MYDB.LDF
FILES IN THERE.
> THE NEW INSTALLATION WILL NOT RECOGNISE THESE FROM THE OLD INSTALLATION.
> IS THERE ANY WAY TO REINSTATE THESE DBS OTHER THAN FROM THE BACK UP THAT I
DID NOT DO?
> HOPING AND PRAYING IN YOUR HANDS O LORD GURU.
Showing posts with label ldf. Show all posts
Showing posts with label ldf. Show all posts
Tuesday, March 27, 2012
CAN I GET MY DATA BACK AFTER REINSTALLING MSDE
Thursday, March 8, 2012
Can data be retrieved from a SQL LDF file (Log)
I have a database that has a corrupt .MDF file, but
the .LDF file is still accessible. My most recent backup
is a week old. My question is: After I re-create the
database, is there any way I can recover the past weeks
transactions from the .LDF file. No transaction dump has
been done since the last backup, so I would think that
theoretically the week's transactions are still in the LDF
file.If you haven't done any transaction log backups since the most recent
database backup you can now backup the log, restore the full backup and then
restore the transaction log backup.
See Books Online for the details.
--
Jacco Schalkwijk
SQL Server MVP
"SteveB" <steve_brooks@.adp.com> wrote in message
news:430d01c39e52$c1fa2950$7d02280a@.phx.gbl...
> I have a database that has a corrupt .MDF file, but
> the .LDF file is still accessible. My most recent backup
> is a week old. My question is: After I re-create the
> database, is there any way I can recover the past weeks
> transactions from the .LDF file. No transaction dump has
> been done since the last backup, so I would think that
> theoretically the week's transactions are still in the LDF
> file.|||"SteveB" <steve_brooks@.adp.com> wrote in message
news:430d01c39e52$c1fa2950$7d02280a@.phx.gbl...
> I have a database that has a corrupt .MDF file, but
> the .LDF file is still accessible. My most recent backup
> is a week old. My question is: After I re-create the
> database, is there any way I can recover the past weeks
> transactions from the .LDF file. No transaction dump has
> been done since the last backup, so I would think that
> theoretically the week's transactions are still in the LDF
> file.
Yes.
Before restoring back up your log with NOTRUNCATE
BACKUP LOG mydb
TO mydevice1
WITH NOTRUNCATE
RESTORE DATABASE mydb
FROM mydevice2
WITH RESTORE.
That should roll your log file forward.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
the .LDF file is still accessible. My most recent backup
is a week old. My question is: After I re-create the
database, is there any way I can recover the past weeks
transactions from the .LDF file. No transaction dump has
been done since the last backup, so I would think that
theoretically the week's transactions are still in the LDF
file.If you haven't done any transaction log backups since the most recent
database backup you can now backup the log, restore the full backup and then
restore the transaction log backup.
See Books Online for the details.
--
Jacco Schalkwijk
SQL Server MVP
"SteveB" <steve_brooks@.adp.com> wrote in message
news:430d01c39e52$c1fa2950$7d02280a@.phx.gbl...
> I have a database that has a corrupt .MDF file, but
> the .LDF file is still accessible. My most recent backup
> is a week old. My question is: After I re-create the
> database, is there any way I can recover the past weeks
> transactions from the .LDF file. No transaction dump has
> been done since the last backup, so I would think that
> theoretically the week's transactions are still in the LDF
> file.|||"SteveB" <steve_brooks@.adp.com> wrote in message
news:430d01c39e52$c1fa2950$7d02280a@.phx.gbl...
> I have a database that has a corrupt .MDF file, but
> the .LDF file is still accessible. My most recent backup
> is a week old. My question is: After I re-create the
> database, is there any way I can recover the past weeks
> transactions from the .LDF file. No transaction dump has
> been done since the last backup, so I would think that
> theoretically the week's transactions are still in the LDF
> file.
Yes.
Before restoring back up your log with NOTRUNCATE
BACKUP LOG mydb
TO mydevice1
WITH NOTRUNCATE
RESTORE DATABASE mydb
FROM mydevice2
WITH RESTORE.
That should roll your log file forward.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.532 / Virus Database: 326 - Release Date: 27/10/2003
Subscribe to:
Posts (Atom)