Four common faults in database system and their solutions

Source: Internet
Author: User
Keywords Fault

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

In the database system, there are four kinds of faults, such as internal fault, system fault, media failure and computer virus fault, which have different solutions for each fault. A transaction failure indicates that the transaction ended without a commit or revocation, so the database may be in an inaccurate state.

  

Four common failures

(1) Internal failure: The internal failure of the transaction can be divided into expected and unexpected, most of the failures are not expected. An expected transaction internal failure is an internal failure that can be found through the transaction program itself, and unexpected internal failures of transactions cannot be handled by the transaction program, such as operational overflow failure, concurrent transaction deadlock failure, failure due to some integrity restrictions, and so on.

(2) system failure: System fault also known as soft fault, is the database in the course of operation, due to hardware failures, database software and operating system vulnerabilities, sudden blackout lights, resulting in the system to stop running, all the running transactions terminated in an irregular manner, requiring a system reboot of a class of failures. Such transactions do not destroy the database, but affect all transactions that are running.

(3) Media failure: Media failure is also known as hard fault, mainly refers to the database in the course of operation, due to the head collision, disk damage, strong magnetic interference, natural and man-made conditions, so that the data in the database part or all of the loss of a class of faults.

(4) Computer virus failure: Computer virus failure is a malicious program, it can reproduce and spread like a virus, in the computer system caused by the destruction of the database can also cause damage (the mode of destruction to the main database file).

Two or four ways to solve the problem

(1) Expected transaction internal failure: ROLLBACK TRANSACTION, undo changes to database.

(2) Unexpected internal failure: Force ROLLBACK TRANSACTION to revoke its modifications to the database with the log file if the transaction is guaranteed to have no effect on other transactions.

(3) system failure: After the computer restarts, the results of all outstanding transaction writes can be rolled back for incomplete transactions, and the results of any unfinished transactions that may be left in the buffer for some or all of the completed transactions need to redo all committed transactions (that is, undo all uncommitted transactions. Redo all committed transactions).

(4) Software fault tolerance for media failure: Use database backup and transaction log files, restore the database to the state at the end of backup by restoring technology.

(5) Media failure of hardware fault tolerance: the use of dual physical storage devices, so that two hard disk storage of the same content, when one of the hard drive failure, timely use of another backup hard disk.

(6) Computer virus failure: The use of firewall software to prevent virus intrusion, the infected database files, the use of anti-virus software to kill, if anti-virus software anti-virus failure, at this time can only use the database backup files, software fault-tolerant way to restore the database files.

These four types of failures, although different, but the impact on the database is not the destruction of the database itself or the destruction of data in the database, the basic principle of its recovery is the use of redundant data stored elsewhere to rebuild the data in the database.

This article starts in Ye Dehua's blog, sponsored by Cheaplululemon, sponsored website address: http://www.cheaplululemon.com/, reprint please indicate the sponsor website address.

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.