June 9, 2009 at 4:53 pm
HI I have a old backup from my corrupted mdf file but the ldf is OK. Can I restore the DB
Thanks anyway
June 9, 2009 at 5:08 pm
Not sure - because I am not sure what you have available.
Do you have a backup of the database?
Do you have a backup of the transaction log?
How old are the backups?
Was the database setup in full recovery model?
If the database was not in full recovery model, then there is nothing in the ldf (log) file to be recovered. If the database was in full recovery model and you don't have all of the transaction log backups, then there is nothing to restore either.
Now, if you have never backed up the transaction log and it is in full recovery model you might be able to get those transaction backed up. Look in BOL at the topic tail-log backup.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 10, 2009 at 12:14 am
Check your backup file using RESTORE VERIFYONLY option.
June 10, 2009 at 12:44 am
FOR SQL Server 2000
-----------------------
If your backup is corrupt irrespective of LDF or MDF , you cannot restore .
If you have the LDF and MDF files but MDF corrupted , you cant do anything except : creating a same database >> swap the files >> take the database to emergency >> run DBCC checkdb and see what all is corrupt and if there is an option for repair_allow_data_loss.In any case you will be loosing some data .You will come to know what data is corrupt only after checkdb and can take the actions after that (like if the index/SP/indexed view/unimportant table is corrupt )
If you have only LDF corrupted , you can rebuild it .
FOR SQL Server 2005 :
-----------------------
In 2005 you have the option to restore a corrupt database backup using the option CONTINUE_AFTER_ERROR
Later you can run checkdb on it to find out the corrupt objects and take actions thereafter.
Abhay Chaudhary
Sr.DBA (MCITP/MCTS :SQL Server 2005/2008 ,OCP 9i)
June 10, 2009 at 5:34 am
aa2home (6/9/2009)
HI I have a old backup from my corrupted mdf file but the ldf is OK. Can I restore the DBThanks anyway
Wouldn't be a good idea. Is this a critical database?
HI I have a old backup from my corrupted mdf file but the ldf is OK
What you really meant by this? so the backup you have got is from your corrupted .mdf?
If your database is corrupted and you have a good backup then it's better to restore it from there.
If you have a corrupted backup, there are 2 options either you can restore it WITH CONTINUE_AFTER_ERROR or run DBCC CHECKDB and see what exactly is corrupted.
It wouldbe great if you provide further information about your business too. Is your business ready to lose some data? the method you follow depends really on your business needs of the database.
June 10, 2009 at 10:24 am
thanks all of you
I realy have problem with DB
Evrething is wrong .... database was not in full recovery model and backup is old
Any way
The point of the matter is backup.. backup... backup....
June 10, 2009 at 10:33 am
aa2home (6/10/2009)
thanks all of youI realy have problem with DB
Evrething is wrong .... database was not in full recovery model and backup is old
Any way
The point of the matter is backup.. backup... backup....
Yeah - you do have a problem. There is nothing in the transaction log to be backed up, so you cannot even perform a tail-log backup and hope it contains everything.
The best you can do is restore the old backup - and accept the data loss. Sorry.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 11, 2009 at 7:07 am
aa2home (6/9/2009)
HI I have a old backup from my corrupted mdf file but the ldf is OK. Can I restore the DBThanks anyway
Hi,
What version of SQL server u are using-- 2000 or 2005 ?
check this : http://www.sqlserverclub.com/articles/how-to-recover-from-a-corrupted-sql-server-database.aspx
it is for 2000, but might give u an idea !!
Hope this helps,
\\K
______________________________________________________________________________________________________________________________________________________________________________________
HTH !
Kin
MCTS : 2005, 2008
Active SQL Server Community Contributor 🙂
June 11, 2009 at 9:35 am
OK boys that's it
I restored an old backup and I accepted the lost data.
thanks again....
June 11, 2009 at 10:29 am
aa2home (6/11/2009)
OK boys that's itI restored an old backup and I accepted the lost data.
thanks again....
Glad, you found the solution.
But you never answered the questions that I have posed?
May 8, 2014 at 7:14 am
I hope you noticed that this thread is 5 years old.
-- Gianluca Sartori
May 8, 2014 at 9:01 am
spaghettidba (5/8/2014)
I hope you noticed that this thread is 5 years old.
So was that post. 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
May 8, 2014 at 9:06 am
Jeff Moden (5/8/2014)
spaghettidba (5/8/2014)
I hope you noticed that this thread is 5 years old.So was that post. 🙂
Nope. I was referring to a post that Steve deleted today.
It contained a misleading spam/ad link.
-- Gianluca Sartori
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply