none
How i can delete ReportServer_log.LDF file in sql server 2005.

    Question

  • Hi,

    My ReportServer_log.LDF file is very huge.(150gb) is their any way to trucate it.
    It is not possible by simple detach>rename>attach>delete process which genrally we are using to delete
    any log files in sql server.

    or

    How we can delete the contents of log files

    Please suggest what will be the procedures.

    Kali Charan Tripathi.
    INDIA


    Tripathi_soft
    Wednesday, August 18, 2010 2:31 PM

Answers

  • I'd suggest backing up the log file and then running DBCC SHRINKFILE(FileName, TRUNCATEONLY).

    Have you any idea why it has grown so much? Is your database in FULL recovery mode? Consider running it in SIMPLE mode or alternatively take regular transaction log backups to prevent it growing.


    every day is a school day
    Wednesday, August 18, 2010 2:50 PM
  • Hi,

    Is this on production? One thing that you can do is, to detach the ReportServer database, rename the log file, and then attach it back to the database server. While attaching, make sure that you dont attach the older one, instead, you can create a new one with default size. However, doing this in production, needs close monitoring.

    Another thing that you can try out is as mentioned in the above response. Refer to the link for more details. Look at the explanation given under target_size parameter which will give you more information related to what you want to achieve.

    However, it is adviced to have appropriate maintenance plan to make sure that the transaction log doesnt grow to unmanagable size. Refer to this link for more details on importance of transaction log maintenance.


    Phani Note: Please mark the post as answered if it answers your question.
    Thursday, August 19, 2010 7:58 AM

All replies

  • I'd suggest backing up the log file and then running DBCC SHRINKFILE(FileName, TRUNCATEONLY).

    Have you any idea why it has grown so much? Is your database in FULL recovery mode? Consider running it in SIMPLE mode or alternatively take regular transaction log backups to prevent it growing.


    every day is a school day
    Wednesday, August 18, 2010 2:50 PM
  • Hi Thanks for your quick reply.

    Yes Your prediction is right my database is in Full recovery mode so i will change it into SIMPLE mode as per your suggestion.

    But i am not able to truncate ReportServer_log.LDF  file by given command DBCC SHRINKFILE(FileName, TRUNCATEONLY).

    It is just reduced only 8 gb but i want more reduction like in mb .How it is possible.

    Please advise me.

    Thank You

     

     


    Tripathi_soft
    Thursday, August 19, 2010 7:01 AM
  • Hi,

    Is this on production? One thing that you can do is, to detach the ReportServer database, rename the log file, and then attach it back to the database server. While attaching, make sure that you dont attach the older one, instead, you can create a new one with default size. However, doing this in production, needs close monitoring.

    Another thing that you can try out is as mentioned in the above response. Refer to the link for more details. Look at the explanation given under target_size parameter which will give you more information related to what you want to achieve.

    However, it is adviced to have appropriate maintenance plan to make sure that the transaction log doesnt grow to unmanagable size. Refer to this link for more details on importance of transaction log maintenance.


    Phani Note: Please mark the post as answered if it answers your question.
    Thursday, August 19, 2010 7:58 AM
  • Have you changed the recovery mode to SIMPLE before running the SHRINKFILE? You will need to do that so it will clear down the log. Alternatively, backup the transaction log and then run the SHRINKFILE statement,.


    every day is a school day
    Thursday, August 19, 2010 8:12 AM
  • Hi,

    It worked for me.

     

    Thanks a lot

     


    Tripathi_soft
    Thursday, August 19, 2010 1:49 PM
  • Can you give me some usefull links on recovery models and mdf,ldf files structures with memory management.

    It wl realy helpfull for me.


    Tripathi_soft
    Thursday, August 19, 2010 1:50 PM
  • Hi Kali,

    For more information about Recovery Model, please see:
    Recovery Model Overview: http://msdn.microsoft.com/en-us/library/ms189275.aspx

    For more information about Database Files, please see:
    Files and Filegroups Architecture: http://msdn.microsoft.com/en-us/library/ms179316.aspx

    Memory usage is another topic regardless the database files. Please see the following article for more information about Memory Architecture:
    Memory Architecture: http://msdn.microsoft.com/en-us/library/ms187499.aspx

    If you have any more questions, please feel free to ask.

    Thanks,
    Jin Chen


    Jin Chen - MSFT
    Friday, August 20, 2010 2:44 AM
    Moderator