Solved

How to Open Or read SQL Server log file .ldf)

Posted on 2003-12-07
9
40,694 Views
Last Modified: 2011-08-18
Dear Sir,

When ever we create database from sql server, it's create two file. (1) .mdf (2) .ldf.
I want to see what's available inside the .ldf file.
Through program (visula basic or any other way). Can you help me.


Best Regards.
M. Md. Rafeek
0
Comment
Question by:md_yasheen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
9 Comments
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9891646
I'm not aware of anything to do this...

why are you even asking ... ?
the log format would be subject to potential change for each microsoft upgrade/fix....

alternatively the only consistent way of seeing what's in the logs

is to do some point in time restores and then detect the changes "normally" in your data tables...

0
 
LVL 34

Accepted Solution

by:
arbert earned 25 total points
ID: 9892702
There is a tool called LogExplorer from lumigent that will allow this http://www.lumigent.com.  There are also several other packages that are starting to show up on the market--netIQ also has one.  LogExplorer will allow you to conditionally commit or rollback transactions.  Other than that, there isn't too much that you can do with the ldf (log file) yourself.

Brett
0
 
LVL 15

Expert Comment

by:Raisor
ID: 9893544
Hi,

@Lowfatspread ... why do hook to a question that you admit not to be able to answer?

@arbert ... you're ABSOLUTELY right!!!

@md_yasheen ... There is no easy way out if you want to read the transaction logs for whatever reason. The transaction log architecture is proprietary to Microsoft and is not published. However, there is an undocumented DBCC LOG command that lets you see the records in transaction log. Here is an example:

DBCC LOG (Your_Database_Name, 2)

As arbert postetd -> theress a third party tool called Log Explorer by ---> Lumigent <---, that helps you read transaction logs and do stuff like recovering data, auditing database etc.


Best regards, Raisor
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9893672
raisor , for the challenge and the learning opportunities this creates...
          and of course because the idea of wanting to read the log files is so OTT, that there
          must be better ways of achieving what MD_yasheen thinks he needs to do...  
 
0
 
LVL 15

Expert Comment

by:Raisor
ID: 9894080
Hi,

Yeah, I see what you mean -> but to be honest, I do not always say what I see without taking time off for reflection before -> and I don't even want to talk about the files that I looked at in the early years ;-)) -> ...

... my believe is: everyone goes its own way -> if md_yasheen gets closer to reading out any log file while reading out a transaction log -> well, then we have one more professional that knows to explain how to read lol files!

@md_yasheen ... can you please explain why it is important for you to read LDF files?


Best regards, Raisor
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 9894111
;-)
yes i'd want to know if md succeeds and manages to understand a particular log file version as well, its bound to come in handy at some stage...

best regards low
0
 
LVL 34

Expert Comment

by:arbert
ID: 9894314
Ya, log explorer is handy (if not pricy).  Actually, we had a Microsoft Engineer on site 3days last week and he highly recommended it (we had already used it in the past).  Just like any tool though, it can be dangerous too....
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about achieving the basic levels of HRIS security in the workplace.
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question