截断事物日志的几种方法

今天部门经理问我如何截断SQL SERVER的日志文件,刚好之前有做过,如下:

1。DBCC SHRINKFILE (DataFil1, 7): 其中datafil1为你要收缩的日志文件名,或者用文件号去代替,一般日志文件号问2, 7为你要收缩到的大小,这里是7MB

2。backup log database_name with no_log

3。设定database的recovery mode为simple,但这种方法是永久性的,且已经增长的日志没办法立即截断

  

No Comments

Be the first to comment on this entry.

Leave a comment

Name(required)
Mail (will not be published)(required)
Website

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs must be fully qualified (eg: http://www.dbifan.com),and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

    搜索本站

    站点日历

    4月 2006
    « 3   5 »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930

    订阅本站

    文章分类

    最新日志

    热点文章

    日志存档

    常用标签