The invention relates to a
database emergency handling method and
system. The method comprises the following steps of: detecting an operational state of a production
library; when the production
library is in a
normal state,
synchronizing data of the production
library into an emergency library in real time; when the production library has a fault, switching the production library to the emergency library, and switching a
database connection address of an application
system to the emergency library; and when the production library returns to the
normal state, switching the emergency library back to the production library, and reversely
synchronizing data read-write, which is performed in the emergency library within the fault time period of the production library, into the production library. According to the method and the
system, in a mode of reverse synchronization from the emergency library to the production library by use of
oracle Active Data Guard, data operation records of the emergency library are reduced, and the
processing time based on
sql covering data in the past is effectively shortened. Furthermore, data covering
modes for all services are same, so that the operation is convenient and quick, and each system is not needed to process covering data.