Why SQL Server requires transaction logs

Source: Internet
Author: User

Why do we need transaction logs to delete or not add log files? The answer is no, if there is no transaction log, your database will not work at all!

The transaction log supports the following operations:

Transaction rollback

If the user or program uses the ROLLBACK statement or the database detects a failed operation. These log files will be used for rollback.

Redo Unfinished transactions

If you restart the database server (service) When a database error occurs, you may find that the database is in recovery mode (in Recovery), which indicates that the database is rolling back a transaction that was not completed before the server (service) was restarted. or continue to perform transactions that have been written to the log file and have not been written to the data file. If you use with RECOVERY in the Restore database, you can also see that the database is in recovery mode.

Recovering a database, file, filegroup, or data page before the error point

If SQL Server has an error and you need to revert to the data before the error occurs, you can implement it as long as you select the full recovery mode. You just have to get a previous full backup, then check the current differences and the subsequent transaction logs to where the error occurred. A detailed introduction will be made later.

High-availability Solutions

This will be detailed in the back.

Why SQL Server requires transaction logs

Related Article

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.