Reduce log file size in SQL

Source: Internet
Author: User

SQLreduce the log file size

Author : CC Abba

2014-6-14

in Daily SQL database operations, there are often SQL log files are oversized and larger than normal MDF database files, as a general user, LDF is too large, it only affects the server's hard disk space. Here's a quick way to reduce the number of log documents to more than Kin seconds.

But I remind you, for the sake of insurance, please back up the database before the operation, in order to avoid data loss. It is also A good practice for IT staff.

DUMP TRANSACTION Filecenter with no_log

BACKUP LOG Filecenter with no_log

DBCC Shrinkdatabase (Filecenter)

--backup LOG HZEW2 with TRUNCATE_ONLY

--DBCC shrinkdatabase (' HZEW2 ')

For more technology sharing, you can join our technology group.

Welcome to join the technology sharing group: 238916811

Reduce log file size in SQL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.