摘要 |
The application discloses a method and a system for processing database state transition. The method disclosed by the application comprises the following steps of: carrying out uniform detection on state transition of primary and standby database servers; if the primary and standby database servers generate state transition, informing a database application layer, so that the database application layer caries out a switching operation corresponding to states of the primary and standby database servers after receiving the notice. The application also discloses the system for processing the database state transition. The system comprises a primary and standby detection unit and a primary and standby state transition informing unit. By the application, the problem that the database is not consistent with a state of a peripheral system due to discrete detection and switching operation on each application layer is avoided at a certain extent, and consistency of the state of the database is ensured when high usability of the database is provided. |