Truncated 60GB log file to 4MB, Is it cause any problem further? (Help needed urgently)

  • Hi everybody,

    1)Here is a 100GB log file with me.While truncating it to 40Gb i suddenly run the query with truncation size to 4MB.It is Very important.Is it cause any problem further in future.

    2)How can i again restore the truncated file size to normal size(100GB).

    Help needed urgently.

    Thank you all,

    Venu Gopal.K
    Software Engineer
    INDIA

  • Sorry, I don't understand what you've done or what your problem is. Can you explain more please?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I'm assuming what you did was truncate the log file and then shrink it, and now you want to expand it again. Is that correct?

    If so, expanding it again should be a simple matter of issuing the usual alter database commands. You can either do that manually, typing them into Management Studio, or you can have Management Studio do it for you, by going into the database's properties and going to the Files section and making your changes there.

    However, I strongly recommend AGAINST truncating and shrinking log files. It is a really, really bad idea as a general practice. Might be necessary in a few rare circumstances, like a log grew out of control due to a badly designed transaction, but it's definitely not something to do on a regular basis. If you are doing this more than once every few years, then you need to look into standard log maintenance plans and policies, review how the recovery models work, and investigate log backups.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I agree with Gus that you don't want to be moving the size around. Why were you shrinking it? Is 100GB too large?

    Look at your log backups, find the largest one through the day, set the log to be a bit larger than that, watch your sizes and periodically adjust if things grow.

  • Thank you fro u r response, what actually my problem is there is a DB with me , the log file of the DB ig 100GB. To decrease the size of the log file i manually truncated it. Actually i wanna to truncate it to 40GB by suddenly i made it for 40MB. It gets truncated to 40MB instead of 40GB.

    This is my problem exactly

    Is this truncation cause any problem to the database functions?

    How can i restore the log file to its original size (ie;100GB)?

    Venu Gopal.K
    Software Engineer
    INDIA

  • Right-click on the database in Management Studio.

    Properties

    Files

    It will list the files that the database is composed of, both data and log files. Usually, the log file is second.

    Two of the things it lists are the file size and the growth increment. Change the file size to the size you want (whether that's 40 Gig or 100 Gig), confirm the growth increment. Click OK.

    That should do what you need.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply