CN108009239A - Data bank access method and system - Google Patents
Data bank access method and system Download PDFInfo
- Publication number
- CN108009239A CN108009239A CN201711228641.2A CN201711228641A CN108009239A CN 108009239 A CN108009239 A CN 108009239A CN 201711228641 A CN201711228641 A CN 201711228641A CN 108009239 A CN108009239 A CN 108009239A
- Authority
- CN
- China
- Prior art keywords
- database
- broker
- request
- standby
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000004075 alteration Effects 0.000 claims abstract description 19
- 230000005540 biological transmission Effects 0.000 claims abstract description 7
- 230000001360 synchronised effect Effects 0.000 claims description 40
- 230000008859 change Effects 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000593 degrading effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
Abstract
The invention discloses a kind of data bank access method and system, wherein method comprises the following steps:Database broker is set, the database access request of client transmission is received by database broker, accesses database;Control database and act on behalf of the database of dynamic client end alteration actual access, realize active-standby switch, database access request is forwarded to the primary database of normal work or standby database.Data bank access method provided by the invention and system, database active-standby switch is realized using the database of database broker dynamic client end alteration actual access.Due to not being related to virtual network address, network address collision will not unsuccessfully be caused due to unloading virtual network address, or since client fails to receive address resolution protocol broadcast and causes failure, substantially increase the reliability of database access.
Description
Technical field
The present invention is related in database system technology field, more particularly to a kind of data bank access method and system.
Background technology
The prior art usually floats to standby number using virtual network address (Virtual IP, abbreviation VIP) from primary database
According to storehouse, realize that client accesses the database changed.Virtual network address is where the primary database during server unloading, due to place
Hostdown, possibly can not complete to unload, so as to be easy to cause network address (i.e. IP) conflict.Moreover, in virtual network address
, it is necessary to send address resolution protocol (ARP) broadcast when changing.Client, can not in the case where failing to receive the broadcast
The variation of virtual network address is perceived, the database of access errors can be caused.
Therefore, the method for the existing database that client access variation is realized using virtual network address, easily by net
, there is network address collision when unloading virtual network address failure in the influence of network, or since client fails to receive address
Analysis protocol broadcast and the failure for causing access errors, reliability be not strong.
The content of the invention
Based on this, the present invention provides a kind of data bank access method and system, is introduced between client and database
Database broker, database active-standby switch is realized by the database of database broker dynamic client end alteration actual access.
Data bank access method provided by the invention, comprises the following steps:
Database broker is set, the database access request of client transmission is received by database broker, accesses data
Storehouse;
Control database and act on behalf of the database of dynamic client end alteration actual access, realize active-standby switch, database is visited
Ask the primary database or standby database that request is forwarded to normal work.
As a kind of embodiment, database broker provides the interface needed for database switching, corresponding by controlling
Interface database is carried out it is offline, reach the standard grade, lifting or degraded operation, the database of dynamic client end alteration actual access;
It is offline:Refer to control the current database for providing service no longer to provide service, database broker stops to specified number
Access request is forwarded according to storehouse;
Reach the standard grade:Refer to not provide currently the database of service and provide service as standby database, database broker is to finger
Determine database forwarding read request;
Lifting:Refer to current standby database being promoted to primary database, database broker is forwarded to specified database and read and write
Request;
Degrade:Refer to current primary database being downgraded to standby database, database broker is no longer forwarded to specified database
Write request.
As a kind of embodiment, the database of the database broker dynamic client end alteration actual access is controlled,
Realize active-standby switch, database access request is forwarded to the primary database of normal work or standby database, including following step
Suddenly:
When the initial primary database of client actual access is stopped, the initial main number that degrades is sent to database broker
Asked according to storehouse;
After database broker returns and has been properly received the result for the initial primary database request that degrades, control targe is for data
Storehouse is synchronous with initial primary database progress data;
After synchronously completing, by sending lifting target to database broker for database request, control targe is for database
The read-write requests of client are received as current primary database;
Other in control group are synchronous with initial primary database progress data for database, and the database after synchronization, which is used as, works as
The standby database of preceding primary database.
As a kind of embodiment, when the database of client actual access is stopped, the database is controlled
The database of dynamic client end alteration actual access is acted on behalf of, realizes active-standby switch, database access request is forwarded to normal work
The primary database of work or standby database, comprise the following steps:
When the initial primary database of client actual access is stopped, offline initial main number is sent to database broker
Asked according to storehouse;
After database broker returns and has been properly received the result of offline initial primary database request, control targe is for data
Storehouse is synchronous for database progress data with other;
After synchronously completing, obtained from initial primary database and be not synchronized to data of the target for database, be synchronized to target
Standby database;
By sending lifting target to database broker for database request, control targe is for database as current main number
The read-write requests of client are received according to storehouse, other in control group are for standby database of the database as current primary database.
As a kind of embodiment, data bank access method provided by the invention is further comprising the steps of:
Judge the primary database of newest selection whether for the synchronous newest standby database of data;
If it is not, then controlling the primary database of newest selection and data, synchronously to carry out data synchronous for newest standby database.
Correspondingly, the present invention also provides a kind of data base access system, including setup module and control module;
The setup module, for setting database broker, the database of client transmission is received by database broker
Access request, accesses database;
The control module, the database of dynamic client end alteration actual access is acted on behalf of for controlling database, and realizes master
Standby switching, the primary database of normal work or standby database are forwarded to by database access request.
As a kind of embodiment, database broker provides the interface needed for database switching, and the control module is led to
Cross control corresponding interface database is carried out it is offline, reach the standard grade, lifting or degraded operation, dynamic client end alteration actual access
Database;
It is offline:Refer to control the current database for providing service no longer to provide service, database broker stops to specified number
Access request is forwarded according to storehouse;
Reach the standard grade:Refer to not provide currently the database of service and provide service as standby database, database broker is to finger
Determine database forwarding read request;
Lifting:Refer to current standby database being promoted to primary database, database broker is forwarded to specified database and read and write
Request;
Degrade:Refer to current primary database being downgraded to standby database, database broker is no longer forwarded to specified database
Write request.
As a kind of embodiment, the control module includes downgrade request unit, the first synchronization unit, the first lifting
Request unit and the second synchronization unit;
The downgrade request unit, is asked for sending the initial primary database that degrades to database broker;
First synchronization unit, the initial primary database request that degrades has been properly received for being returned in database broker
As a result after, control targe is synchronous with initial primary database progress data for database;
The first lifting request unit, it is standby by sending lifting target to database broker for after synchronously completing
Database request, control targe receive the read-write requests of client for database as current primary database;
Second synchronization unit, it is same for database and initial primary database to carry out data for other in control group
Step, standby database of the database as current primary database after synchronization.
As a kind of embodiment, the control module further includes offline request unit, the 3rd synchronization unit, the 4th same
Walk unit and the second lifting request unit;
The offline request unit, for when the initial primary database of client actual access is stopped, to data
Storehouse agency sends offline initial primary database request;
3rd synchronization unit, offline initial primary database request has been properly received for being returned in database broker
As a result after, control targe is synchronous for database progress data with other for database;
4th synchronization unit, for target for database and other carry out for database after data synchronously complete, from first
Obtained in beginning primary database and be not synchronized to data of the target for database, be synchronized to target for database;
The second lifting request unit, for by sending lifting target to database broker for database request, control
Target processed receives the read-write requests of client for database as current primary database, other in control group are for database conduct
The standby database of current primary database.
As a kind of embodiment, data base access system provided by the invention, further includes judgment module;
Whether the judgment module is used to judging the primary database of newest selection for the synchronous newest standby database of data, and
When the judgment result is No, controlling the primary database of newest selection and data, synchronously to carry out data synchronous for newest standby database.
The beneficial effect of the present invention compared with the prior art is:
Data bank access method provided by the invention and system, utilize database broker dynamic client end alteration actual access
Database realize database active-standby switch., will not be due to unloading virtual network due to not being related to virtual network address
Network address collision is unsuccessfully caused in address, or since client fails to receive address resolution protocol broadcast and causes failure.This hair
It is bright smaller by web influence, the active-standby switch of database can be reliably achieved, it is ensured that client can correctly have access to switching
Database afterwards, substantially increases the reliability of database access.
Brief description of the drawings
Fig. 1 is the flow diagram for the data bank access method that the embodiment of the present invention one provides;
The principle schematic for the data bank access method that Fig. 2 embodiment of the present invention one provides;
Fig. 3 is the principle schematic of data bank access method provided by Embodiment 2 of the present invention;
Fig. 4 is the flow diagram of data bank access method provided by Embodiment 2 of the present invention;
Fig. 5 is the principle schematic for the data bank access method that the embodiment of the present invention three provides;
Fig. 6 is the flow diagram for the data bank access method that the embodiment of the present invention three provides;
Fig. 7 is the structure diagram for the data base access system that the embodiment of the present invention four provides.
Embodiment
Below in conjunction with attached drawing, the technical characteristic above-mentioned and other to the present invention and advantage are clearly and completely described,
Obviously, described embodiment is only the section Example of the present invention, rather than whole embodiments.
Referring to Fig. 1, the embodiment of the present invention one provides a kind of data bank access method, comprises the following steps:
S100, set database broker, and the database access request of client transmission is received by database broker, accesses
Database.
The present invention introduces database broker between client and database, as shown in Fig. 2, all clients all pass through number
According to storehouse proxy access database.Database broker can forward requests to corresponding according to the difference of the type of database request
Primary database or standby database.One group of database can only have a primary database, but can have one or more standby data
Storehouse.Database broker can have one or more, and all database brokers in same group of master/slave data storehouse keep identical setting.
Load balancing and failover can be realized by load balancing software or equipment between database broker.
S200, control database and act on behalf of the database of dynamic client end alteration actual access, realizes active-standby switch, by data
Storehouse access request is forwarded to the primary database of normal work or standby database.
Using data bank access method provided by the invention, client all accesses database by database broker, utilizes
The database of database broker dynamic client end alteration actual access realizes database active-standby switch.Due to not being related to virtual net
Network address, therefore network address collision will not unsuccessfully be caused due to unloading virtual network address, or since client fails to receive
Address resolution protocol is broadcasted and causes failure.The present invention is smaller by web influence, can be reliably achieved the active and standby of database and cut
Change, it is ensured that client can correctly have access to the database after switching, substantially increase the reliability of database access.
Further, provided as a kind of embodiment, the present invention by database broker needed for database switching
Interface, by control corresponding interface database is carried out it is offline, reach the standard grade, lifting or degraded operation, dynamic client end alteration is real
The database that border accesses, specifically:
Offline to refer to control the current database for providing service no longer to provide service, database broker stops to specified data
Storehouse forwards access request;
Reach the standard grade and refer to not provide currently the database of service and provide service as standby database, database broker is to specifying
Database forwards read request;
Lifted and refer to current standby database being promoted to primary database, database broker please to specified database forwarding read-write
Ask;
Degradation refers to current primary database being downgraded to no longer to be write for database, database broker to specified database forwarding
Request.
Database switching refers to, when primary database breaks down or needs to safeguard, make write request be transferred to one of them standby
On database.Database switching can be divided into actively switching and failover.The primary database newly selected is necessary for data synchronization
Newest standby database, it is otherwise, it is necessary to synchronous with newest standby database progress data, it is consistent to ensure.
Further, the data bank access method provided using embodiment one, which is realized, actively to be switched, and can pass through following steps
Realize:
S210, send the initial primary database request that degrades to database broker;
S211, after database broker returns and has been properly received the result for the initial primary database request that degrades, control targe
Standby database is synchronous with initial primary database progress data;
S212, after synchronously completing, target is lifted for database request, the standby number of control targe by being sent to database broker
The read-write requests of client are received as current primary database according to storehouse;
Other in S213, control group are synchronous with initial primary database progress data for database, the database after synchronization
Standby database as current primary database.
The data bank access method provided using embodiment one realizes failover, can be realized by following steps:
S220, when the initial primary database of client actual access is stopped, to database broker send it is offline just
Beginning primary database is asked;
S221, after database broker returns and has been properly received the result of offline initial primary database request, control targe
Standby database is synchronous for database progress data with other;
S222, after synchronously completing, obtain from initial primary database and be not synchronized to data of the target for database, be synchronized to
Target is for database;
S223, by sending lifting target to database broker for database request, control targe is for database as working as
Preceding primary database receives the read-write requests of client, other in control group are for standby data of the database as current primary database
Storehouse.
Above-mentioned function that is offline, reaching the standard grade, lifted, degrading four kinds of database broker operate interfaces is fixed, is actively switched
Can be as needed with two kinds of operations of failover, call required interface.Can also be by a control module, for operand
It is used for Test database failure according to four kinds of interfaces of storehouse agency and the synchronization action of database, and a detection module, realizes
Actively switching and failover.
Specific example is set forth below, the process of above-mentioned active switching and failover both databases switching is carried out
Illustrate.
Referring to Fig. 3 and Fig. 4, embodiment two:Actively switch
As shown in figure 3, original state:Database 1 is primary database, can provide write request;Database 2, database 3 to
Database n is standby database, can only provide read request, and it is new primary database to select database 2.
Handoff procedure is as shown in figure 4, comprise the following steps:
S11, send degrading data storehouse 1 to database broker and ask.
Since database broker may have one or more, it is necessary to wait all database brokers all return successful result or
Confirm that the database broker could continue next step after no longer providing service, to ensure data consistency.S11 operations are completed
Afterwards, database broker is not forwarding write request to database 1.
It is synchronous that S12, database 2 and database 1 carry out data.
After the completion of the step, both data of database 1 and database 2 have ensured that consistent.The step needs database of record 2
State after data synchronization is completed, so that subsequent step uses.
S13, to database broker send lifting database 2 ask.
After the completion of operation, database 2 starts to receive write request.If database broker operation failure, number is not interfered with
According to uniformity and integrality, but client write request can be made to fail.Subsequent step can optionally be interrupted or skip mistake.
S14, database 3 to database n are synchronous with the progress of database 1 data.
After the completion of the step, database 1, the data of database 3 to database n have ensured that unanimously.
S15, using database 1, database 3 to database n as database 2 standby database.
The duplication source of database 1, database 3 to database n is switched to shape of the database 2 in step S11 by the step
State.
Referring to Fig. 5 and Fig. 6, embodiment three:Failover
As shown in figure 5, original state:Database 1 is primary database, has been broken down;Database 2, database 3 to data
Storehouse n is standby database, can only provide read request, and it is new primary database to select database 2.
Handoff procedure is as shown in fig. 6, comprise the following steps:
S21, send offline database 1 to database broker and ask.
Since database broker may have one or more, it is necessary to wait all database brokers all return successful result or
Confirm that the database broker could continue next step after no longer providing service, to ensure data consistency.After the completion of operation,
Database broker no longer forwards any request to database 1, and disconnects and having connected.
S22, sync database 2 to the data between database n.
After the completion of the step, the data of database 2 to database n have ensured that unanimously.The step needs database of record 2 to exist
The state after data synchronization is completed, so that subsequent step uses.
S23, trial obtain not synchronous data to data storehouse 2 from database 1.
Since database 1 is failed, so the step may fail, mistake can be skipped herein.
S24, to database broker send lifting database 2 ask.
After the completion of the step, database 2 starts to receive write request.If database broker operation failure, do not interfere with
Data consistency and integrality, but client write request can be made to fail, it can optionally interrupt subsequent step or skip mistake.
S25, make standby database of the database 3 to database n as database 2.
The duplication source of database 3 to database n is switched to state of the database 2 in step S22 by the step.
When standby database breaks down, as database 2 breaks down, offline database 2 can be sent to database broker
Request.After the completion of, database broker no longer forwards any request to database 2., can be with the database recovery occurred before after
Request of reaching the standard grade is sent to database broker.Database after reaching the standard grade is standby database positioning without exception, and database broker only can be to it
Forward read request.
Referring to Fig. 7, based on same inventive concept, the embodiment of the present invention four additionally provides a kind of data base access system, bag
Include setup module 100 and control module 200.
Specifically, setup module 100 is used to set database broker, and the number of client transmission is received by database broker
According to storehouse access request, database is accessed.
Control module 200 is used to control database to act on behalf of the database of dynamic client end alteration actual access, realizes active and standby
Switching, the primary database of normal work or standby database are forwarded to by database access request.
In the present embodiment, database broker provides the interface needed for database switching, and control module 200 is corresponded to by controlling
Interface database is carried out it is offline, reach the standard grade, lifting or degraded operation, the database of dynamic client end alteration actual access;
It is offline:Refer to control the current database for providing service no longer to provide service, database broker stops to specified number
Access request is forwarded according to storehouse;
Reach the standard grade:Refer to not provide currently the database of service and provide service as standby database, database broker is to finger
Determine database forwarding read request;
Lifting:Refer to current standby database being promoted to primary database, database broker is forwarded to specified database and read and write
Request;
Degrade:Refer to current primary database being downgraded to standby database, database broker is no longer forwarded to specified database
Write request.
As a kind of embodiment, control module 200 includes downgrade request unit, the first synchronization unit, the first lifting
Request unit and the second synchronization unit.
Downgrade request unit is used to send the initial primary database request that degrades to database broker;First synchronization unit is used for
After database broker returns and has been properly received the result for the initial primary database request that degrades, control targe is for database and initially
It is synchronous that primary database carries out data;First lifting request unit is used for after synchronously completing, and is carried by being sent to database broker
Target is risen for database request, control targe receives the read-write requests of client for database as current primary database;Second
Synchronization unit is used for other, database works synchronization after synchronous with initial primary database progress data for database in control group
For the standby database of current primary database.
Further, control module 200 further include offline request unit, the 3rd synchronization unit, the 4th synchronization unit and
Second lifting request unit.Offline request unit is used for when the initial primary database of client actual access is stopped, to
Database broker sends offline initial primary database request;3rd synchronization unit, which is used to return in database broker, to be properly received
After the result of offline initial primary database request, control targe is synchronous for database progress data with other for database;4th
Synchronization unit be used for target for database and other carry out for database after data synchronously complete, obtaining from initial primary database
Take and be not synchronized to data of the target for database, be synchronized to target for database;Second lifting request unit is used for by number
Acted on behalf of according to storehouse and send lifting target for database request, control targe is for database as current primary database reception client
Read-write requests, other in control group are for standby database of the database as current primary database.
Further, data base access system provided by the invention, further includes on the basis of above-described embodiment four and sentences
Disconnected module.Whether the primary database that judgment module is used to judge newest selection is for data synchronously newest standby database, and sentencing
Disconnected result for it is no when, controlling the primary database of newest selection, synchronously newest standby database progress data are synchronous with data.
Data base access system provided by the invention, by database broker active-standby switch, without changing to client
It is dynamic and smaller by web influence, the active-standby switch of database can be reliably achieved, it is ensured that client can correctly have access to
Database after switching, substantially increases the reliability of database access, and simple system is easy to maintain.
Particular embodiments described above, has carried out the purpose of the present invention, technical solution and beneficial effect further
Describe in detail, it will be appreciated that the foregoing is merely the specific embodiment of the present invention, the protection being not intended to limit the present invention
Scope.Particularly point out, to those skilled in the art, within the spirit and principles of the invention, that is done any repaiies
Change, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
1. a kind of data bank access method, it is characterised in that comprise the following steps:
Database broker is set, the database access request of client transmission is received by database broker, accesses database;
Control database and act on behalf of the database of dynamic client end alteration actual access, realize active-standby switch, please by database access
Ask the primary database for being forwarded to normal work or standby database.
2. data bank access method according to claim 1, it is characterised in that database broker provides database switching institute
The interface needed, by controlling, corresponding interface is offline to database progress, reach the standard grade, client is changed in lifting or degraded operation, dynamic
Hold the database of actual access;Wherein:
It is offline:Refer to control the current database for providing service no longer to provide service, database broker stops to specified database
Forward access request;
Reach the standard grade:Refer to not provide currently the database of service and provide service as standby database, database broker is to specified number
Read request is forwarded according to storehouse;
Lifting:Refer to current standby database being promoted to primary database, database broker forwards read-write requests to specified database;
Degrade:Refer to current primary database being downgraded to standby database, database broker is no longer write to specified database forwarding please
Ask.
3. data bank access method according to claim 2, it is characterised in that control the database broker dynamic to change
The database of client actual access, realizes active-standby switch, and database access request is forwarded to the primary database of normal work
Or standby database, comprise the following steps:
The initial primary database request that degrades is sent to database broker;
After database broker returns and has been properly received the result for the initial primary database request that degrades, control targe for database with
It is synchronous that initial primary database carries out data;
After synchronously completing, by sending lifting target to database broker for database request, control targe is for database conduct
Current primary database receives the read-write requests of client;
Other in control group are synchronous with initial primary database progress data for database, and the database after synchronization is as current main
The standby database of database.
4. the data bank access method according to Claims 2 or 3, it is characterised in that control the database broker dynamic
The database of client end alteration actual access, realizes active-standby switch, and database access request is forwarded to the main number of normal work
According to storehouse or standby database, comprise the following steps:
When the initial primary database of client actual access is stopped, offline initial primary database is sent to database broker
Request;
After database broker returns and has been properly received the result of offline initial primary database request, control targe for database with
Other carry out data synchronization for database;
After synchronously completing, obtained from initial primary database and be not synchronized to data of the target for database, be synchronized to the standby number of target
According to storehouse;
By sending lifting target to database broker for database request, control targe is for database as current primary database
The read-write requests of client are received, other in control group are for standby database of the database as current primary database.
5. data bank access method according to any one of claims 1 to 3, it is characterised in that further comprising the steps of:
Judge the primary database of newest selection whether for the synchronous newest standby database of data;
If it is not, then controlling the primary database of newest selection and data, synchronously to carry out data synchronous for newest standby database.
6. a kind of data base access system, it is characterised in that including setup module and control module;
The setup module, for setting database broker, the database access of client transmission is received by database broker
Request, accesses database;
The control module, the database of dynamic client end alteration actual access is acted on behalf of for controlling database, and realizes active and standby cut
Change, database access request is forwarded to the primary database of normal work or standby database.
7. data base access system according to claim 6, it is characterised in that database broker provides database switching institute
The interface needed, the control module by control corresponding interface database is carried out it is offline, reach the standard grade, lifting or degraded operation,
The database of dynamic client end alteration actual access;
It is offline:Refer to control the current database for providing service no longer to provide service, database broker stops to specified database
Forward access request;
Reach the standard grade:Refer to not provide currently the database of service and provide service as standby database, database broker is to specified number
Read request is forwarded according to storehouse;
Lifting:Refer to current standby database being promoted to primary database, database broker forwards read-write requests to specified database;
Degrade:Refer to current primary database being downgraded to standby database, database broker is no longer write to specified database forwarding please
Ask.
8. data base access system according to claim 7, it is characterised in that the control module includes downgrade request list
Member, the first synchronization unit, the first lifting request unit and the second synchronization unit;
The downgrade request unit, is asked for sending the initial primary database that degrades to database broker;
First synchronization unit, the result for the initial primary database request that degrades has been properly received for being returned in database broker
Afterwards, control targe is synchronous with initial primary database progress data for database;
The first lifting request unit, for after synchronously completing, target to be lifted for data by being sent to database broker
Storehouse is asked, and control targe receives the read-write requests of client for database as current primary database;
Second synchronization unit, it is synchronous for database and initial primary database to carry out data, together for other in control group
Standby database of the database as current primary database after step.
9. the data base access system according to claim 7 or 8, it is characterised in that the control module further includes offline
Request unit, the 3rd synchronization unit, the 4th synchronization unit and the second lifting request unit;
The offline request unit, for when the initial primary database of client actual access is stopped, to database generation
Offline initial primary database request is sent in haircut;
3rd synchronization unit, the result of offline initial primary database request has been properly received for being returned in database broker
Afterwards, control targe is synchronous for database progress data with other for database;
4th synchronization unit, for target for database and other carry out for database after data synchronously complete, from initial main
Obtained in database and be not synchronized to data of the target for database, be synchronized to target for database;
The second lifting request unit, for by sending lifting target to database broker for database request, controlling mesh
The standby database of mark receives the read-write requests of client as current primary database, and other in control group are for database as current
The standby database of primary database.
10. according to claim 6 to 8 any one of them data base access system, it is characterised in that further include judgment module;
Whether the primary database that the judgment module is used to judge newest selection is for data synchronously newest standby database, and sentencing
Disconnected result for it is no when, controlling the primary database of newest selection, synchronously newest standby database progress data are synchronous with data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711228641.2A CN108009239B (en) | 2017-11-29 | 2017-11-29 | Database access method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711228641.2A CN108009239B (en) | 2017-11-29 | 2017-11-29 | Database access method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108009239A true CN108009239A (en) | 2018-05-08 |
CN108009239B CN108009239B (en) | 2020-08-04 |
Family
ID=62054956
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711228641.2A Active CN108009239B (en) | 2017-11-29 | 2017-11-29 | Database access method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108009239B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108881025A (en) * | 2018-06-01 | 2018-11-23 | 国电南瑞科技股份有限公司 | More power grid regulation system interface unified view integrated approaches based on cloud terminal mode |
CN110928945A (en) * | 2018-09-04 | 2020-03-27 | 阿里巴巴集团控股有限公司 | Data processing method and device for database and data processing system |
CN111522870A (en) * | 2020-04-09 | 2020-08-11 | 咪咕文化科技有限公司 | Database access method, middleware and readable storage medium |
CN114827080A (en) * | 2022-06-06 | 2022-07-29 | 武汉四通信息服务有限公司 | IP switching method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070121801A1 (en) * | 2005-10-05 | 2007-05-31 | Alex Montoya | System and method for maintaining a translations database to effect call control at a remote terminal |
US20080086516A1 (en) * | 2006-10-04 | 2008-04-10 | Oracle International | Automatically changing a database system's redo transport mode to dynamically adapt to changing workload and network conditions |
CN102033912A (en) * | 2010-11-25 | 2011-04-27 | 北京北纬点易信息技术有限公司 | Distributed-type database access method and system |
CN105468717A (en) * | 2015-11-20 | 2016-04-06 | 北京百度网讯科技有限公司 | Database operation method and device |
CN106060004A (en) * | 2016-05-09 | 2016-10-26 | 深圳市永兴元科技有限公司 | Database access method and database agent node |
-
2017
- 2017-11-29 CN CN201711228641.2A patent/CN108009239B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070121801A1 (en) * | 2005-10-05 | 2007-05-31 | Alex Montoya | System and method for maintaining a translations database to effect call control at a remote terminal |
US20080086516A1 (en) * | 2006-10-04 | 2008-04-10 | Oracle International | Automatically changing a database system's redo transport mode to dynamically adapt to changing workload and network conditions |
CN102033912A (en) * | 2010-11-25 | 2011-04-27 | 北京北纬点易信息技术有限公司 | Distributed-type database access method and system |
CN105468717A (en) * | 2015-11-20 | 2016-04-06 | 北京百度网讯科技有限公司 | Database operation method and device |
CN106060004A (en) * | 2016-05-09 | 2016-10-26 | 深圳市永兴元科技有限公司 | Database access method and database agent node |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108881025A (en) * | 2018-06-01 | 2018-11-23 | 国电南瑞科技股份有限公司 | More power grid regulation system interface unified view integrated approaches based on cloud terminal mode |
CN110928945A (en) * | 2018-09-04 | 2020-03-27 | 阿里巴巴集团控股有限公司 | Data processing method and device for database and data processing system |
CN110928945B (en) * | 2018-09-04 | 2023-06-20 | 阿里巴巴集团控股有限公司 | Data processing method and device for database and data processing system |
CN111522870A (en) * | 2020-04-09 | 2020-08-11 | 咪咕文化科技有限公司 | Database access method, middleware and readable storage medium |
CN111522870B (en) * | 2020-04-09 | 2023-12-08 | 咪咕文化科技有限公司 | Database access method, middleware and readable storage medium |
CN114827080A (en) * | 2022-06-06 | 2022-07-29 | 武汉四通信息服务有限公司 | IP switching method and system |
CN114827080B (en) * | 2022-06-06 | 2022-09-23 | 武汉四通信息服务有限公司 | IP switching method and system |
Also Published As
Publication number | Publication date |
---|---|
CN108009239B (en) | 2020-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108009239A (en) | Data bank access method and system | |
CN104158693B (en) | The disaster-tolerant backup method and system of data service | |
EP2091180A1 (en) | Method, system and device for realizing switching between main and spare | |
CN101320339B (en) | Information-processing equipment and system therefor | |
CN101610533B (en) | Method and device for realizing backup switching of access controller | |
EP1376361A4 (en) | Server duplexing method and duplexed server system | |
KR20010072379A (en) | Fault tolerant computer system | |
CN101110776B (en) | Backup method, backup device and backup system for data business | |
CN101903864B (en) | Node system, server switching method, server unit and data adapting method | |
CN102882704B (en) | Link protection method in the soft reboot escalation process of a kind of ISSU and equipment | |
US20070270984A1 (en) | Method and Device for Redundancy Control of Electrical Devices | |
CN104038376A (en) | Method and device for managing real servers and LVS clustering system | |
CN103618627A (en) | Method, device and system for managing virtual machines | |
CN102388570B (en) | Single board running method and system under active-standby mode | |
EP2437539A1 (en) | Main/standby switching interface module, network element system, and link information synchronization detection method | |
CN103281720B (en) | The hot standby changing method of wireless controller and device, wireless controller, connecting system | |
CN105577444A (en) | Wireless controller management method and wireless controller | |
CN106685688A (en) | Cluster computer device synchronous upgrade method | |
WO2003063522A1 (en) | Standby mobile switching center | |
CN112052127B (en) | Data synchronization method and device for dual-computer hot standby environment | |
US7039402B1 (en) | Disaster recovery for very large GSM/UMTS HLR databases | |
CN102238036A (en) | User session backup handover method and system | |
CN114598594B (en) | Method, system, medium and equipment for processing application faults under multiple clusters | |
CN106817239B (en) | site switching method, related device and system | |
CN113852514A (en) | Data processing system with uninterrupted service, processing equipment switching method and connecting equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Database access methods and systems Effective date of registration: 20231229 Granted publication date: 20200804 Pledgee: Hangzhou United Rural Commercial Bank Co.,Ltd. Dongyue sub branch Pledgor: HANGZHOU YOUZAN TECHNOLOGY CO.,LTD. Registration number: Y2023980074694 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right |