none
Sharepoint LDF file size

    Question

  • Hello All,

    We have been using sharpoint services 3.0 for roughly a year now on a Win2k3 server using the embedded sql server that  installed with sharpoint services.  We have noticed that in the past year the site has grown quite quickly which is good because it shows that it is actually being used by staff and departments.

    The problem we are having is that the LDF file is over 25 Gigs and growing.  How can we safely shrink this LDF file WSS_Content_Log.ldf to a level closer to say 5 Gigs and keep it in that range in order to maintain HD space for expansion to the actual Sharepoint site.

    Further background information:  Not using SQL Server on Sharepoint Hosted Server, backups are daily via a stsadm batch file.  I have installed SQL Server Management Studio Express and followed steps in backing up but have stopped short of changing the initial size of log file via the properties for fear of corrupting site and losing information.

    I have searched high and low for a response but nothing that has given a definitive answer. Any help will be appreciated.

    Eric
    Tuesday, October 28, 2008 8:03 PM

Answers

  • 1. Right click WSS_Content and choose Tasks -> Backup
    2. Select backtup type "Transaction log", select destination backup file and click Ok.
    3. After backing up the DB, right click WSS_Content and choose Tasks -> Shrink -> Files
    4. Select the type log and shrink action (eg release unused space)

    Right click DB, choose properties then Files and set your intial log file size here.
    SSA
    Tuesday, October 28, 2008 8:21 PM

All replies

  • 1. Right click WSS_Content and choose Tasks -> Backup
    2. Select backtup type "Transaction log", select destination backup file and click Ok.
    3. After backing up the DB, right click WSS_Content and choose Tasks -> Shrink -> Files
    4. Select the type log and shrink action (eg release unused space)

    Right click DB, choose properties then Files and set your intial log file size here.
    SSA
    Tuesday, October 28, 2008 8:21 PM
  • steps to truncate log file when huge!
    Disconnect content database.

    stsadm -o deletecontentdb -url <url> -databasename <database name> [-databaseserver <database server name>]

    stsadm -o addcontentdb -url <url> -databasename <database name> [-databaseserver <database server name>] [-databaseuser <database username>] [-databasepassword <database password>] [-sitewarning <site warning count>] [-sitemax <site max count>]


    1. Right click WSS_Content and choose Tasks -> Backup
    2. Select backtup type "Transaction log", select destination backup file and click Ok.
    3. After backing up the Transaction DB, right click WSS_Content and choose Tasks -> Shrink -> Files
    4. Select the type log and shrink action (eg release unused space)
    5. Set the backup model to simple so truncates <Transaction log becomes less than 30mb>
    6. Select the type log and shrink action (eg release unused space)
    7. Set the backup model to Full

    Delete your transaction logs now.

    This should work like charm !

    Tuesday, March 06, 2012 9:35 PM