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 |
|
solnt
Starting Member
5 Posts |
Posted - 2006-08-09 : 02:57:20
|
Hi all! I need to read contents of mdf and ldf file in database. Are there any way to implement this purpose??? If you know one please let me now too. Thanks Hope help you and me... |
|
|
Wanderer
Master Smack Fu Yak Hacker
1168 Posts |
Posted - 2006-08-09 : 08:14:11
|
| Why? Those files are coded for SQL Server to undertand, not external applications? Messing around with them would be a VERY BAD THING, imho.I you have to, then I recommend getting Kalen Delaney's Inside SQL Server book. As I recall, it had chapter(s) devoted to fvile layout of the actual pages, bits and bytes etc.*##* *##* *##* *##* Chaos, Disorder and Panic ... my work is done here! |
 |
|
|
solnt
Starting Member
5 Posts |
Posted - 2006-08-10 : 00:07:54
|
I understand your point but do you think what we can do when we can retrieve some info from mdf file or ldf file...? For example, lost data when you drop table and your ldf file does't help( and you don't have a backup file too :) ). What can you do? Hope help you and me... |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2006-08-10 : 01:58:59
|
quote: Originally posted by solnt I understand your point but do you think what we can do when we can retrieve some info from mdf file or ldf file...? For example, lost data when you drop table and your ldf file does't help( and you don't have a backup file too :) ). What can you do? Hope help you and me...
update your resume maybe?-ec |
 |
|
|
Wanderer
Master Smack Fu Yak Hacker
1168 Posts |
Posted - 2006-08-10 : 05:46:36
|
quote: Originally posted by solnt I understand your point but do you think what we can do when we can retrieve some info from mdf file or ldf file...? For example, lost data when you drop table and your ldf file does't help( and you don't have a backup file too :) ). What can you do? Hope help you and me...
The best answer I can give is to point you to Kalen's book. I remember reading the information, but it was a long time ago, and it was a company book (previous company), so I don't have access to it any more.try googling the mdf file format, but I very seriously doubt you'll find much out there. Also, there's no guarantee's you data is there any more - I stringly suspect it will be gone, since SQL would have marked those pages as available and (a) used them, (b) destroyed them in any shrink file / shrink db operations etc. I can't recall, but think that on the drop table, it is just the pointers that are initially updated, so in theorey the data might still be there, if you could (a) find it, (b) understand it.Good luck, and if you do manage this minor miracle, you could probably make quite a bit of money with a tool that does what you are trying to do.*##* *##* *##* *##* Chaos, Disorder and Panic ... my work is done here! |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-08-10 : 07:06:22
|
quote: Originally posted by solnt I understand your point but do you think what we can do when we can retrieve some info from mdf file or ldf file...? For example, lost data when you drop table and your ldf file does't help( and you don't have a backup file too :) ). What can you do? Hope help you and me...
You should concentrate on making sure you have backups, instead what to do when you don't have backups.CODO ERGO SUM |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-08-10 : 07:16:34
|
| >> when you drop table and your ldf file does't help( and you don't have a backup file too :) ). What can you do?Get some advice on how to maintain a system - maybe get someone in who knows ho9w to build a system.>> you don't have a backup file That is implicitly saying that you don't mind losing the database. Thios should be addressed before the system goes live and should be part of the requirements included in the design. Trying to bolt it on afterwards is asking for trouble.As to recovering data from an mdf file - there are companies that will do it and I believe microsoft will also provide that service.It's not a trivial task.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|
|
|