The invention relates to the technical field of
system software communication, and discloses a read-write method based on a dual-network redundant
database. The method comprises the following steps: S100, configuring a first
database connection pool and a second
database connection pool when loading for the first time, and arranging the first
database connection pool and the second
database connection pool in an accessible first address and a second address respectively; s102, acquiring a database
client from a
database connection pool corresponding to the first address; s104, judging whether the acquisition is successful or not, if so, turning to S106, otherwise, turning to S110; s106, returning to the database
client; s108, performing reading and / or writing operation on the
database server side by using the returned database
client side; s110, exchanging positions of the first database
connection pool and the second database connection pool, and counting exchange times; and S112, judging whether the current count value exceeds the maximum number of times or not, if so, prompting that the database client is failed to obtain, and otherwise, returning to S102. Therefore, high-reliability reading and writing of the database can be realized.