GeeCON Prague 2014*
The moose likes JDBC and the fly likes LDF File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "LDF File" Watch "LDF File" New topic
Author

LDF File

Robert Aryan
Greenhorn

Joined: May 08, 2009
Posts: 21
How can I read LDF file . I dont have any SQL server. Only have LDF file
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

According to a quick web search, the LDF file contains a transaction log. It is probably proprietary format and I doubt any free utility to process it exists.

What do you want to do with the file?
Robert Aryan
Greenhorn

Joined: May 08, 2009
Posts: 21
I want to see some transactions.There are some utilities(ApexSQL etc) but in that we have to connect to SQL Server.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

The file has been created by an MS SQL Server installation. Why can't you use that same installation to read it?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Robert Aryan
Greenhorn

Joined: May 08, 2009
Posts: 21
We don't have access to production database(SQL Server) they gave us the ldf file only.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Can you try the following:
- Install SQL Server Express.
- Create a new database with the same name, so a new LDF file with the same name will be created.
- Shutdown SQL Server Express*.
- Replace the new LDF file with the existing one.
- Restart SQL Server Express.

This may work, although it wouldn't surprise me if it didn't because the new database doesn't have the same structure.

* It's also possible to detach the files from the database and reattach them but that requires to call a duo of stored procedures. This way is easier.
Robert Aryan
Greenhorn

Joined: May 08, 2009
Posts: 21
Thanks its work for me.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

You're welcome
 
 
subject: LDF File