zoukankan      html  css  js  c++  java
  • Sql Server 2008 清理日志文件

    Use LingZhong
    
    Select NAME,size From sys.database_files
    
    ALTER DATABASE LingZhong SET RECOVERY SIMPLE WITH NO_WAIT
    
    ALTER DATABASE LingZhong SET RECOVERY SIMPLE
    
    USE LingZhong
    
    DBCC SHRINKFILE(N'LingZhong_log',0,TRUNCATEONLY)
    
    ALTER DATABASE LingZhong SET RECOVERY FULL WITH NO_WAIT
    
    ALTER DATABASE LingZhong SET RECOVERY FULL
    

      

    解决方案二:

        USE[master]
        GO
        ALTER DATABASE YinJi SET RECOVERY SIMPLE WITH NO_WAIT
        GO
        ALTER DATABASE YinJi SET RECOVERY SIMPLE   --简单模式
        GO
        USE YinJi
        GO
        DBCC SHRINKFILE (N'YinJi_log' , 2, TRUNCATEONLY)  --设置压缩后的日志大小为2M,可以自行指定
        GO
        USE[master]
        GO
        ALTER DATABASE YinJi SET RECOVERY FULL WITH NO_WAIT
        GO
        ALTER DATABASE YinJi SET RECOVERY FULL  --还原为完全模式
        GO
    

      

  • 相关阅读:
    2015 省赛随便写写
    有向图强连通分量
    复杂状态的动态规划
    hdu 3350
    树状DP
    十字链表矩阵
    最优矩阵链乘
    poj 3778
    Poj 3771 hdu 3405
    [2015hdu多校联赛补题]hdu5302 Connect the Graph
  • 原文地址:https://www.cnblogs.com/yangda/p/7443957.html
Copyright © 2011-2022 走看看