Solved

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

Posted on 2003-12-07
9
40,620 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In today’s complex data management environments, it is not unusual for UNIX servers to be dedicated to a particular department, purpose, or database.  As a result, a SAS® data analyst often works with multiple servers, each with its own data storage…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now