Solved

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

Posted on 2003-12-07
9
40,721 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
Webinar: MariaDB® Server 10.2: The Complete Guide

Join Percona’s Chief Evangelist, Colin Charles as he presents MariaDB Server 10.2: The Complete Guide on Tuesday, June 27, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

717 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