The present invention discloses a method and device for parallel operation of
database dual writing in a domestic
database switching environment, which belongs to the field of
database technology. The method includes the following steps: according to a database operation request, by intercepting a database component, asynchronously initiating a domestic database operation in accordance with a predetermined configuration and multi-threading, and adopting two methods to perform database dual writing; parallel execution of different
SQL statements with the same
SQL identifier in the process of switching a domestic database in an
electronic banking system; adopting a method of persistently running a
target database in a production environment, continuously collecting the operating indicators of the
target database in the production environment, using persistent data to measure the indicators of the
target database running in the production environment as a measure of whether the target database reaches the standard of switching a source database, and performing target database
verification. The present invention ensures that the target database is fully verified during the switching process between the target database and the source database, and reduces the unpredictable
impact of the domestic database on the application.