WO2017101731A1

Service providing method and system for database

Abstract

A service providing method and system for a database. The method comprises: when a master database server (301) receives a service providing request of a client, changing data in a database according to the service providing request, writing change information about the database into a first transaction log, and sending the first transaction log to a slave database server (302); and when a network connection between the master database server (301) and the slave database server (302) is disconnected or times out, or when the number of accumulated transaction logs, failing to be successfully sent, in the master database server (301) exceeds a pre-set value, or when the sending time of the first transaction log exceeds a pre-set time, the master database server (301) transmitting the first transaction log or information about an update object corresponding to the first transaction log to a buffer region (303). It can be seen therefrom that when a standby database temporarily cannot receive a log, a master database sends the log to the buffer region (303) so as to prevent the log from being lost.

WO2017101731A1, drawing sheet 1
Sheet 1 of 4

Term

No projected expiry on record.

  1. Priority
  2. Filed
  3. Published
  4. Today

16 claims: 3 independent, 13 dependent

  1. 1
    A method for providing a database of a database, the method comprising:一种数据库的服务提供方法,其特征在于,所述方法包括: When the primary database server receives the service request of the client, changes the data in the database according to the service providing request, writes the change information of the database into the first transaction log, and sends the first transaction log to the first transaction log From the database server;当主数据库服务器接收到客户端的服务提供请求时,根据所述服务提供请求更改数据库中的数据,并将所述数据库的更改信息写入到第一事务日志中,将所述第一事务日志发送给从数据库服务器;When the network connection between the primary database server and the slave database server is disconnected or timed out, or the number of unsuccessful transaction logs accumulated in the primary database server exceeds a preset value, or the The primary database server transmits information of the first transaction log or the update object corresponding to the first transaction log to the buffer when the transmission time of the first transaction log exceeds the preset time. 当所述主数据库服务器与所述从数据库服务器之间的网络连接断开或超时,或者,所述主数据库服务器中累积的未发送成功的事务日志的数量超过预设数值时,或者,所述第一事务日志的发送时间超过预设时间时,所述主数据库服务器将所述第一事务日志或者所述第一事务日志对应的更新对象的信息传输给缓冲区。
  2. 9
    A database system, characterized in that the system comprises:a primary database server, from a database server and a buffer;一种数据库系统,其特征在于,所述系统包括:主数据库服务器、从数据库服务器和缓冲区;Wherein the primary database server is configured to change the data in the database according to the service providing request when the primary database server receives the service request of the client and writes the change information of the database to the first transaction log , Sending the first transaction log to a database server;所述主数据库服务器,用于当所述主数据库服务器接收到客户端的服务提供请求时,根据所述服务提供请求更改数据库中的数据,并将所述数据库的更改信息写入到第一事务日志中,将所述第一事务日志发送给从数据库服务器;The slave database server for receiving the first transaction log sent by the primary database server;所述从数据库服务器,用于接收所述主数据库服务器发送的所述第一事务日志;The primary database server is also used to disconnect or time out a network connection between the primary database server and the slave database server, or that the number of non-successfully sent transaction logs accumulated in the primary database server exceeds The first transaction log or the update information corresponding to the first transaction log is transmitted to the buffer when the predetermined value is preset or when the transmission time of the first transaction log exceeds the preset time;所述主数据库服务器,还用于当所述主数据库服务器与所述从数据库服务器之间的网络连接断开或超时,或者,所述主数据库服务器中累积的未发送成功的事务日志的数量超过预设数值时,或者,所述第一事务日志的发送时间超过预设时间时,将所述第一事务日志或者所述第一事务日志对应的更新对象的信息传输给缓冲区;And a buffer for storing information of the first transaction log or the update object corresponding to the first transaction log. 所述缓冲区,用于存储所述第一事务日志或者所述第一事务日志对应的更新对象的信息。
  3. 16
    A system as claimed in any one of claims 9 to 15, characterized in that:如权利要求9至15中任一项所述的系统,其特征在于: The slave database server is further configured to receive the first transaction log and to play back the first transaction log to synchronize the data from the database server with the primary database server. 所述从数据库服务器,还用于接收所述第一事务日志,将所述第一事务日志进行回放,以使所述从数据库服务器与所述主数据库服务器同步数据。