Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
zk
Starting Member
2 Posts |
Posted - 2012-12-22 : 05:26:17
|
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
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-12-22 : 06:34:34
|
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. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-22 : 06:42:58
|
try something like1. Create a new databaseCREATE DATABASE <DBname here>2.use sp_helpdb to get the filenames for the mdf and the ldf you just createdsp_helpdb <DBname here>it will have logical names for data and log files3.use RESTORE FILELISTONLY to get the logical filenames of the mdf and ldf in the backup file likeRESTORE FILELISTONLY FROM DISK = <your backup file path>4.Use RESTORE with MOVE like soRESTORE 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 MVPhttp://visakhm.blogspot.com/ |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2012-12-22 : 09:12:08
|
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. |
|
|
zk
Starting Member
2 Posts |
Posted - 2012-12-23 : 00:28:57
|
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 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-12-23 : 01:34:08
|
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 MVPhttp://visakhm.blogspot.com/ |
|
|
prett
Posting Yak Master
212 Posts |
Posted - 2012-12-24 : 01:03:23
|
If you have full database backup then you can easily restore your database by using two options:1. SQL Server Management Studio2. Transact-SQLPlease take look of these two Microsoft KB Articles: http://msdn.microsoft.com/en-us/library/ms177429.aspxhttp://msdn.microsoft.com/en-us/library/ms189895%28v=sql.90%29.aspx |
|
|
|
|
|