zoukankan      html  css  js  c++  java
  • SharePoint Config database Log file too big

    SharePoint Config database logs are one thing to keep an eye on since they do have a tendency to grow. If you don’t perform a full farm backup usually the log doesn’t get emptied and it just keeps bloating.

    If you’re running SQL Server Express with default installation, you can find the files in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

    image

    As we see in the example above, even though the database is only 6 megs, the log file grew to 11 gigs. Let’s reduce that:

    1. If you don’t have it yet, download and install SQL Server Management Studio express from here.

    2. Run the Management Studio and connect to your SQL Server.

    3. Expand “Databases” and select your config database “SharePoint_Config”.

    4. Right Click it, select Tasks –> Shrink –> Files

    image

    5. In the new window select Release unused space and click OK.

    image

    If that doesn’t decrease the database size much, do the following:

    1. First to be on the safe side, let’s back it up (this step is optional)

    Select New Query



    type the following:

    BACKUP LOG [Sharepoint_Config] TO DISK=’D:\configLogBackup.bak’
    GO

    where SharePoint_Config is the name of your config database file and D:\configlogbackup.bak is the location and file name of where you’ll make the backup.

    And click Execute

    image

    This may take a while if your log file is big.

    2. Next clear the query (or click New Query again) and enter the following commands

    BACKUP LOG [Sharepoint_Config] WITH TRUNCATE_ONLY
    USE [SharePoint_Config]
    GO

    anc click Execute again

    image

    3. Clear the query or open another query tab and enter the next command:

    DBCC SHRINKFILE (N’SharePoint_Config_log’ , 50)
    GO

    The 50 in the command above sets the size in MB to truncate the log to. If your config db is of different name, replace the SharePoint_Config part above with your config db name.

    And click Execute yet again.

    image

    The result you get should be something like below:

    image

    and ofcourse the file size:

    image

    ahhh. finally some space.

    http://www.sharepointboris.net/2008/10/sharepoint-config-database-log-file-too-big-reduce-it/

  • 相关阅读:
    GitHub 教程【转】
    Github 教程
    Excel 多个单元格输入同样内容
    寻找问题远比解决问题重要!
    蒲公英: 一个提供App 存储、分发、Bug管理的网站
    Dacapao 实验集(9.12 版本) 能不能给个网址?【内存分析实验】
    软件测试思维导图[ZZ]
    程序员、技术领导、管理者各有烦恼,你占了几条?ZZ
    r test
    mooctest项目总结 【转载】
  • 原文地址:https://www.cnblogs.com/icedog/p/1932345.html
Copyright © 2011-2022 走看看