|
-
Jan 27th, 2007, 08:35 AM
#1
Thread Starter
New Member
[2005] How to Open Or read SQL Server log file .ldf
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 visual basic.net 2005 or any other version. Can you help me.
-
Jan 27th, 2007, 08:58 AM
#2
Re: [2005] How to Open Or read SQL Server log file .ldf
The LDF file is a log file. It holds any temporary, cached information that hasn't been fully committed to the the database. It is not intended to be read. It is in binary format. There is one program that I am aware of that can read LDF files and it comes with a VERY LARGE price tag.
-tg
-
Jan 27th, 2007, 09:17 AM
#3
Thread Starter
New Member
Re: [2005] How to Open Or read SQL Server log file .ldf
 Originally Posted by techgnome
The LDF file is a log file. It holds any temporary, cached information that hasn't been fully committed to the the database. It is not intended to be read. It is in binary format. There is one program that I am aware of that can read LDF files and it comes with a VERY LARGE price tag.
-tg
Sir,
i accept ur quotes that LDF file is a binary file. but as a log file we can read it through some front end language and we can find the queries which would reveal that what the user done with the database. now i need help how to implement it.
-
Jan 27th, 2007, 09:37 AM
#4
Re: [2005] How to Open Or read SQL Server log file .ldf
You are confused about the concept of this log file.
It is not a log file that you are familiar with - logging (printing) results of a process, for instance.
MS SQL is a write-ahead-logged database engine. That means that when you read rows from the MDF they first go into the LDF - data resides in the LDF - not messages you can read. When you update rows in the database they do not go into the MDF - they first go into the LDF.
The engine - in the background - moves data from the LDF to the MDF as it requires.
If a transaction is held open (not committed) the rows remain in the LDF. In that case they do not go to the MDF until COMMIT. If the transaction is rolled back then they never go to the MDF at all.
Data sits in the LDF flagged with what SPID process has it - locks and what not - all kinds of info sits in the LDF.
There are SYSTEM STORED PROCEDURES that will show you what processes have data in the LDF - but not in a fashion that allows you to see the data.
Again - it is not a LOG FILE...
-
Jan 27th, 2007, 10:01 AM
#5
Thread Starter
New Member
Re: [2005] How to Open Or read SQL Server log file .ldf
ok sir. Thank you very much for your valuable information and instant reply.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|