DBCC SHRINKFile not working

  • Hi,

    I have database whose Logfile has increased to 48 GB.Now when I am trying to Shrink it,The command runs fine but the Size of the Logfile is yet not Changed.

    What I have done is I have just run the Command DBCC SHRINKFILE(MS_Log,1)

    I checked on some websites and found that in ordre to Clear the LOg i Need to Change the Model to Simple and then truncate it .

    But the Issue in Doing it is that I have configured MIRRORING and LOGSHIPPING on my Database.

    Can Somebody help me related to the same as the space in the Drive is reducing Day by Day

    .I dont wanna Disturb the Mirroring and Logshipping on my DB Server

  • if your using SQL2008 then you need to set your database to SIMPLE mode

    here is what i use to clear all my transaction logs on my test servers, bear in mind it clears all logs for all databases.

    SCript removed not for this thread message me if you want a copy

    ***The first step is always the hardest *******

  • U sure that would not HAMPER My MIRRORING and LOGSHIPPING???

  • It'll break both.

    Please read through this - Managing Transaction Logs[/url], also maybe this http://www.sqlservercentral.com/articles/Transaction+Log/72488/

    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
  • Thx Gila Hopefully this may help me in understanding the transactional Logs and PLan for it

  • Check the status of your mirror sesion firstly, log records that have not been transferred cannot be truncated and often cause the log to grow wildly.

    Also check the status of the Log shipping backup job to ensure it's running successfully.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • ahh sorry i misunderstood what you where trying to achieve

    ***The first step is always the hardest *******

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

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