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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 How to READ or VIEW *.LDF file in SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-03-30 : 09:10:24
writes "Any body know How to view or read *.LDF or *.MDF file"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-30 : 09:19:18
Why dont you restore them and write queries?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-03-30 : 09:19:51
DBCC PAGE is an undocumented command that allows you to read raw SQL Server pages. Google it for the syntax, or refer to:

The Guru's Guide to Transact-SQL by Ken Henderson

or Inside SQL Server 2000 by Kalen Delaney. They also describe the undocumented DBCC LOG command for reading the transaction log. You can also use Lumigent's Log Explorer, which is probably the best choice:

http://www.lumigent.com/

Failing that you can always read the files using a hex editor, but you'll get a lot of gibberish. Microsoft does provide documentation on the file structures, there are some details here:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57044

And if you're thinking of directly modifying these files outside of normal SQL Server operations, well, I hope you make frequent backups and your resume is up to date...
Go to Top of Page
   

- Advertisement -