Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Aug 2004
    Posts
    28

    Unanswered: How to View the .LDF and .MDF file

    Dear Members

    How to View the .LDF and .MDF file

    Can anybody tell me how to see the details of .ldf and .mdf file which is there in Data directory under MS SQL installed directory

    Is there any viewer of these files.

    I need help on this becuase I want to knwo what sort of activites are going on a particular database.

    Regards
    Praveen Kumar Pandey

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    Details of the files itself: sp_helpdb [dbname]
    If you're after what activities (select/insert/update) are going on, you might find the profiler usefull.

  3. #3
    Join Date
    Aug 2004
    Posts
    28

    Thanks Kaiwos

    Thanks Kaiwos

    First thing first thanx for immediate reply, well you are right in your sense but I need to view the contents of .LDF and .MDF file.

    Regards
    Praveen Kumar Pandey

  4. #4
    Join Date
    Feb 2004
    Posts
    492
    Sorry, I've never heard of a program that is able to open any of the files and make sence about it's structure and find out what's going on.

  5. #5
    Join Date
    Jul 2003
    Location
    The Dark Planet
    Posts
    1,401
    Praveen , the LDF and MDF files as far as I know are in a MS properietery format and there are no viewers availible for the same. In case you need to know what activities are going on in your database , you will have to use the profiler
    Get yourself a copy of the The Holy Book

    order has no physical Brett in The meaning of a Kaiser . -database data

  6. #6
    Join Date
    Feb 2004
    Posts
    492
    Wouldn't recommend it but here's an alternative: deice sqlserver

  7. #7
    Join Date
    Aug 2004
    Posts
    8
    It may not be exactly what you're looking for, but you might try DBCC PAGE.

  8. #8
    Join Date
    Feb 2003
    Location
    Milano, Italy
    Posts
    80
    For the LDF you can use third party log explorers.

    One that is really cool is here:

    http://www.apexsql.com/sql_tools_log.htm
    Davide Mauri
    http://www.davidemauri.it

  9. #9
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    SQL Server is the only viewer for MDF/NDF/LDF files as far as I know. Can you describe what you want in a bit more detail, since there may be something that will do what you need instead of what you asked for!

    -PatP

  10. #10
    Join Date
    Aug 2004
    Posts
    28

    Hello Pat Phelan

    Hello Pat Phelan

    Thank you for reply. Well as a DBA i want to know what is really happening to my various application database when I am not there, even if that database get crashed , then without re-installing the MS-SQL i go through these files and really see what basically happen and come to know abt the reason.

    Regards
    Praveen Kumar Pandey

  11. #11
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Ah! For that you want something like SQL Profiler (included with SQL Server) or for post-mortems Lumigent's Log Explorer. It is built just to do that task, and it does it well!

    -PatP

  12. #12
    Join Date
    Aug 2004
    Posts
    28

    Thanx Now I am satisfied

    Thanx Pat Phelon

    Aha I am now satisified with the this seems to solve my problems. Onece again thanx buddy

    With due respect and regards
    Praveen Kumar Pandey

  13. #13
    Join Date
    Aug 2004
    Posts
    28

    Hello One question regarding the LDF and MDF file

    Hello Dear Members

    Is these files also records the backup and restore activities of database

    Regards
    Praveen Kumar Pandey

  14. #14
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Yes, about the only things that don't get logged are SELECT statements and session settings. You can set a database so that bulk operations aren't logged (which is a VERY bad thing to do in my opinion), but very few people do that and the operation itself still gets logged even if the incoming data does not.

    Yes, both SQL Profiler and Lumigent's log explorer will show backup and restore activities.

    -PatP

  15. #15
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    PSS uses their internal viewer (am still working on getting it inhouse) that lays the entire database (data device) into extents/pages when database corruption results in database to be in Suspect state.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •