truncate log

  • is there any data loss if i do shrinking.

    thanks

    🙂

  • Try shrinking the log files of database.It doesnt create ant problems i think 😀

    [font="Comic Sans MS"]+++BLADE+++[/font]:cool:

  • it can be perform on production server, is there any problem to log backups or some other recover options.

    🙂

  • vrabhadram (4/6/2009)


    is there any data loss if i do shrinking.

    thanks

    What are you trying to shrink here? Shrinking is basically releasing any unused space to the OS.

  • Don't use auto shrink. That's a major performance hit in most circumstances. If you've had some kind of over-sized transaction or error with the log backups or something that caused the log file(s) to grow too large, yes, you can use shrink and it won't affect data. If, on the other hand, you just think the log is too big... you may need to look at what's happening on your system. Do you have log backups in place and are they functioning? Is there something creating too many logs in the system such as bulk processes being performed one a time, etc. You might need to investigate the system prior to simply shrinking the file because it might just grow back again and you have to pay the performance cost of the growth (blocking processes while the growth occurs).

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • You can shrink your files without losing any data.

    Please be careful that you are only releasing space that you know you are not going to need again in the near future.

    We had an instance here where somebody shrank our transaction log here, only for the weekly index defrag on sunday to spill over into monday as it had to regrow the transaction log.

    Still not all bad news as we have a cowboy points policy here so beer was provided for us by the guilty party that friday

    Hope this helps,
    Rich

    [p]
    [/p]

  • Yes, that's true on whatever the members said.

    First of all bear in mind that you should arrive at this situation where you should shrink your file. If the files have grown it means that they need that much space, even if you shrink the files they will grow again and regular growth and shrinking will cause fragmentation and a big hit on performance.

    Analyze your data growth, and decide at a maximum value so, that you don't have to auto

    grow again.

    If your recovery model is in full recovery model, then take regular Tlog backups which will truncate the log files to reuse the space made available.

    Richard Douglas (4/6/2009)


    Still not all bad news as we have a cowboy points policy here so beer was provided for us by the guilty party that friday

    haha. what does that mean? it actually sounds funny, sorry am a bit dumbhooo...:-P

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

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