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 FilesMicrosoft SQL ServerMSSQL.1MSSQLData

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

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

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

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

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.

The result you get should be something like below:

and ofcourse the file size:

ahhh. finally some space.

SharePoint Config database Log file too big – reduce it!的更多相关文章

  1. How To Write In Sharepoint Log File 怎么对自定义的MOSS代码写日志

    How To Write In Sharepoint Log File 怎么对自定义的MOSS代码写日志 Add Microsoft.Office.Server dll in your project ...

  2. ORACLE等待事件: log file parallel write

    log file parallel write概念介绍 log file parallel write 事件是LGWR进程专属的等待事件,发生在LGWR将日志缓冲区(log_buffer)中的重做日志 ...

  3. Script to Collect Log File Sync Diagnostic Information (lfsdiag.sql) (文档 ID 1064487.1)

    the article from :http://m.blog.itpub.net/31393455/viewspace-2130875/ Script to Collect Log File Syn ...

  4. 由于Replication,DBCC Shrink不能收缩Log File

    使用Backup创建测试环境之后,发现testdb的Log File过大,达到400GB,由于测试环境实际上不需要这么大的Log Space,占用400GB的Disk Space实在浪费Disk Re ...

  5. backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.

    昨天在检查YourSQLDba备份时,发现有台数据库做备份时出现了下面错误信息,如下所示: <Exec>   <ctx>yMaint.ShrinkLog</ctx> ...

  6. log file switch (checkpoint incomplete)

    接手了一个新交接的库,alert日志频繁报告log file switch (checkpoint incomplete)事件 oracle文档解释: Waiting for a log switch ...

  7. Linux/Unix shell 监控Oracle告警日志(monitor alter log file)

    使用shell脚本实现对Oracle数据库的监控与管理将大大简化DBA的工作负担,如常见的对实例的监控,监听的监控,告警日志的监控,以及数据库的备份,AWR report的自动邮件等.本文给出Linu ...

  8. log file sync

    Recently, our application system has updated one app. I receive a email of complain the db server ch ...

  9. 什么时候会刷新备库控制文件refresh the standby database control file?

    通过合理的设置,对于Primary的绝大数操作,都是可以传递到Physical Standby,datafile的操作是通过STANDBY_FILE_MANAGEMENT参数来控制的,但是即使STAN ...

随机推荐

  1. [BZOJ 4923][Lydsy1706月赛]K小值查询

    传送门 势能分析平衡树,splay或treap都可以 放个指针版的就跑 #include <bits/stdc++.h> using namespace std; #define rep( ...

  2. HDU6312 Game(博弈,拿出本数与这个数的除数)

    题意:A和B玩游戏 , 给出1 ~ n 的集合 ,每个人可以拿出一个数 , 这个数的除数也被拿出 , A先开始 , 没有数拿的人就输 , 问A赢不赢 分析:很有意思的一道题目 ///假设2 ~ n A ...

  3. pyquery的简单操作

    一.初始化 1.html初始化 html = ''' <div> <ul> <li class="item-0">first item</ ...

  4. vue父子组件生命周期函数执行顺序

    vue父组件加载和销毁执行最后一个钩子函数之前先执行一遍子组件的钩子: 1.加载 父:beforecreate-created-beforeMount-(子:beforecreate-created- ...

  5. IT职场?未来?

    转自 IT职场?未来? 不能否认,有些技术大牛,生活也过的不错,工资不少挣.但是这种人,本来就不多啊,很少啊.这些人一般都是小时候就搞程序的,你觉得你半路出家,能变成这种超级牛人么?? 而且这些牛人, ...

  6. 日志收集之nxlog

    一,软件介绍 nxlog 是用 C 语言写的一个开源日志收集处理软件,它是一个模块化.多线程.高性能的日志管理解决方案,支持多平台.可以处理来自许多不同来源的大量事件日志.支持的日志处理类型包括重写, ...

  7. GreenPlum 大数据平台--备份-邮件配置-gpcrondump & gpdbrestore(五)

    01,备份 生成备份数据库 [gpadmin@greenplum01 ~]$ gpcrondump -l /gpbackup/back2/gpcorndump.log -x postgres -v [ ...

  8. B站视频下载(VideoHelper)

    继续上次的知乎爬虫, 这次开始了哔哩哔哩的爬虫实践: 首先介绍下如何下载吧: VideoHelper 里面有三种方式下载b站视频. 同样的流程, 还是先抓包,分析参数,寻找参数(包括之前的请求包和页面 ...

  9. 小型Basic编译器问题

    # include <stdio.h> # include <string.h> # include <ctype.h> # include <stdlib. ...

  10. php 中全局变量global 的使用

    简介 即使开发一个新的大型PHP程序,你也不可避免的要使用到全局数据,因为有些数据是需要用到你的代码的不同部分的.一些常见的全局数据有:程序设定类.数 据库连接类.用户资料等等.有很多方法能够使这些数 ...