SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 crash mdf and ldf and i have only full back up
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

zk
Starting Member

2 Posts

Posted - 12/22/2012 :  05:26:17  Show Profile  Reply with Quote
i dont have mdf and ldf they have crashed i have only one full back up for 6 month ago now i have a question what do i do with this situation?
please help me immidiatly
thanks

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 12/22/2012 :  06:34:34  Show Profile  Reply with Quote
Do you mean to say that you lost the hard drive(s) and the mdf and ldf files are gone forever? In that case, the best you can hope for is a restore from the six-month old backup. If the database is really critical, you might consider seeking the help of companies that recover data in such cases - but they tend to be very expensive.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 12/22/2012 :  06:42:58  Show Profile  Reply with Quote
try something like

1. Create a new database
CREATE DATABASE <DBname here>

2.use sp_helpdb to get the filenames for the mdf and the ldf you just created

sp_helpdb <DBname here>

it will have logical names for data and log files

3.use RESTORE FILELISTONLY to get the logical filenames of the mdf and ldf in the backup file like

RESTORE FILELISTONLY 
FROM DISK = <your backup file path>

4.Use RESTORE with MOVE like so

RESTORE DATABASE <DBname>
FROM DISK = <backup path>
WITH REPLACE,RECOVERY,
MOVE <Logical data file name> TO <your new data file path> , MOVE <logical log file name> TO <your new log file path>

http://blog.nitorsys.com/restore-sql2008-bak-file-to-local-machine/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Edited by - visakh16 on 12/22/2012 06:46:12
Go to Top of Page

sodeep
Flowing Fount of Yak Knowledge

USA
7174 Posts

Posted - 12/22/2012 :  09:12:08  Show Profile  Reply with Quote
What do you mean by you don't have mdf and ldf? you can't delete mdf and mdf if database is in use. IF your db online, run DBCC Checkdb and post the error message in Data Corruption page so expert can help you with it. Otherwise you will have to restore from full backup.
Go to Top of Page

zk
Starting Member

2 Posts

Posted - 12/23/2012 :  00:28:57  Show Profile  Reply with Quote
quote:
Originally posted by sodeep

What do you mean by you don't have mdf and ldf? you can't delete mdf and mdf if database is in use. IF your db online, run DBCC Checkdb and post the error message in Data Corruption page so expert can help you with it. Otherwise you will have to restore from full backup.



i mean my data base crash and mdf ,ldf dont atach and i ihave only one full backup for 6 month ago
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 12/23/2012 :  01:34:08  Show Profile  Reply with Quote
quote:
Originally posted by zk

quote:
Originally posted by sodeep

What do you mean by you don't have mdf and ldf? you can't delete mdf and mdf if database is in use. IF your db online, run DBCC Checkdb and post the error message in Data Corruption page so expert can help you with it. Otherwise you will have to restore from full backup.



i mean my data base crash and mdf ,ldf dont atach and i ihave only one full backup for 6 month ago


then you can try the steps i suggested to get db up from 6 months ago backup. Please be aware that DB will only be in state till 6 months back

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

prett
Posting Yak Master

USA
202 Posts

Posted - 12/24/2012 :  01:03:23  Show Profile  Visit prett's Homepage  Reply with Quote
If you have full database backup then you can easily restore your database by using two options:

1. SQL Server Management Studio
2. Transact-SQL

Please take look of these two Microsoft KB Articles:
http://msdn.microsoft.com/en-us/library/ms177429.aspx
http://msdn.microsoft.com/en-us/library/ms189895%28v=sql.90%29.aspx

Edited by - prett on 12/24/2012 01:03:52
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.83 seconds. Powered By: Snitz Forums 2000