Truncating or shrinking a 65GB Log File with available 2.8GB harddisk space

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khickyphutz
    New Member
    • Nov 2006
    • 7

    Truncating or shrinking a 65GB Log File with available 2.8GB harddisk space

    Good day!

    I would like to ask for a technical advice regarding transaction logs. Right now, our server only have 2.8GB due to the transaction log of our database which is 65GB now. Its database size is around 1.8GB. There is an approximate growth of 1GB+ per day in the transaction log.

    I have tried backing up the transaction log with the option of remove inactive transaction logs but it wont work, as well as backing up completely the database.

    I have tried shrinking the transaction log to a specified size but the smallest size I can reduce it is 64GB.

    What should I do in order for me to reduce the size of the transaction log?



    Thank you and God bless.
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by khickyphutz
    Good day!

    I would like to ask for a technical advice regarding transaction logs. Right now, our server only have 2.8GB due to the transaction log of our database which is 65GB now. Its database size is around 1.8GB. There is an approximate growth of 1GB+ per day in the transaction log.

    I have tried backing up the transaction log with the option of remove inactive transaction logs but it wont work, as well as backing up completely the database.

    I have tried shrinking the transaction log to a specified size but the smallest size I can reduce it is 64GB.

    What should I do in order for me to reduce the size of the transaction log?



    Thank you and God bless.
    hold your breath and delete it after you copy it over to another disk.

    Comment

    • khickyphutz
      New Member
      • Nov 2006
      • 7

      #3
      Originally posted by willakawill
      hold your breath and delete it after you copy it over to another disk.
      ???

      I already have copied the DATA and LOG file to my hardisk through Remote Desktop. Now, How will I be able to use the DATA and LOG? Assuming the database name is AgriMrpPrd and the Files are: AgriMrpPrd.mdf and AgriMrpPrd_Log. ldf.

      Sowee to the nooby question...

      Take care and God Bless

      Comment

      • WayneW
        New Member
        • Nov 2006
        • 9

        #4
        Try
        truncate log {databasename} with truncate_only

        Comment

        • khickyphutz
          New Member
          • Nov 2006
          • 7

          #5
          This is what I have entered in SQL Analyzer:

          truncate log AgriMrpPrd with truncate_only

          Where AgriMrpPrd is the name of the database.


          The error is:
          Server: Msg 170, Level 15, State 1, Line 1
          Line 1: Incorrect syntax near 'log'.

          Comment

          • WayneW
            New Member
            • Nov 2006
            • 9

            #6
            backup log AgriMrpPrd with truncate_only

            Comment

            • khickyphutz
              New Member
              • Nov 2006
              • 7

              #7
              I already have run the script and it compiled successfully but there was no change in the size of my transaction log.

              the transaction log file size is still the same and it continues to grow every day.
              any other alternative way to reduce its size?Ü

              thank you and god bless

              Comment

              • khickyphutz
                New Member
                • Nov 2006
                • 7

                #8
                Good day wayne,

                after running the script you gave me, I tried to shrink the database this time and I can already set its minimum size from 64GB to 5GB now. after shrinking the transaction log, the size now of my transaction log is only 5GB.

                Thank's a lot manÜ Thank you so much, It really helps.

                Take care and God Bless.



                MaDz

                Comment

                Working...