Database switching method and database switching system

A database and master database technology, applied in the field of database management, can solve problems such as inability to perform rollback operations and increased losses, and achieve the effect of smooth switching and fast rollback

CN103810174AActive Publication Date: 2014-05-21ADVANCED NEW TECH CO LTD
2 Cites 11 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2014-05-21

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention provides a database switching method and a database switching system. The method comprises the steps that a compatible switch of each server is started to start a compatible logic module of the corresponding server, the compatible logic modules execute compatible processing of service compatibility of a main database and a spare database, a data source building logic module makes the main database be built into a main data source and makes the spare database be built into a spare data source on the basis of the switched-off states of data source switches; the data source switch of each server is switched on, so that each server is connected with the spare database rather than being connected with the main database, the compatible logic modules continue to execute compatible processing, and the data source building logic module makes the main database be built into the spare data source and makes the spare database be built into the main data source on the basis of the switched-on states of the data source switches; the compatible switch of each server is switched off after preset time.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present application relates to the field of database management, in particular to a database switching method and a database switching system. Background technique

[0002] In the application of the database, the switching of the database may include database splitting, failover (failover), and the like. Among them, database splitting is a way to increase system capacity. By splitting the data processed in one database into multiple databases according to certain rules, the pressure on a single database is reduced and the system capacity is doubled. Database splitting methods are mainly divided into vertical splitting according to business and horizontal splitting for hot tables. Failover means database failover. After the database fails and goes down, it uses its own mechanism to complete the switch from the primary database to the standby database in a short time and continue to provide protection measures for normal services. In other words, f...

Examples

Embodiment Construction

[0040] The main idea of ​​this application is to propose the following solutions for the problems existing in the prior art: firstly, keep the service available. When the business is running normally, the database is switched through a switch, and a compatibility state is added during the database switching process, allowing the current data source (hereinafter also referred to as the primary data source) and the data source to be switched (hereinafter also referred to as the backup) Data source) is managed by the application system (that is, the business management system) at the same time, and through compatibility processing, it is ensured that the business request in the switching process selects the correct data source. Moreover, the switch can be used to quickly switch the state. In the event of an abnormality in the system, the switch can be used to quickly roll back to the previous stable state and still provide normal services. After the problem is fixed, the switch st...