A method for managing a primary and secondary databases, the primary database and the secondary databases sharing a lock and contending for ownership of the lock, the lock having a mutual exclusion feature so only one database can hold the lock at a same time, the one database holding the lock being the primary database, wherein the primary database is configured to continuously update the lock to extend a validity period of the lock before the validity period expires, and wherein the primary database cannot complete updating the lock when the primary database is performing an upgrade or maintenance operation within the validity period; wherein the method is performed by a lock arbitration server and comprises: determining (S110; S310), by a first determining module of the lock arbitration server, whether the lock held by the primary database has expired, wherein the lock held by the primary database expires when the validity period expires before the lock is updated to extend the validity period; and in response to determining that the lock held by the primary database has expired: sending, by a first sending module of the lock arbitration server, a lock expiration notification to the secondary databases, receiving, by a record module of the lock arbitration server, lock requests sent by the secondary databases based on the lock expiration notification, and recording a receiving time of the lock requests, determining (S120; S340), by a second determining module of the lock arbitration server, whether a lock renewal request of the primary database is received, and in response to determining that the lock renewal request of the primary database is not received, selecting (S130; S350), by a first processing module of the lock arbitration server, a secondary database of the secondary databases as a new primary database seizing the lock, the selecting (S130; S350) comprising selecting, as the new primary database, the secondary database with the earliest receiving time, and controlling, by the first processing module, the primary database to be switched to the secondary database of the secondary databases. determining (S110; S310), by a first determining module of the lock arbitration server, whether the lock held by the primary database has expired, wherein the lock held by the primary database expires when the validity period expires before the lock is updated to extend the validity period; and in response to determining that the lock held by the primary database has expired: sending, by a first sending module of the lock arbitration server, a lock expiration notification to the secondary databases, receiving, by a record module of the lock arbitration server, lock requests sent by the secondary databases based on the lock expiration notification, and recording a receiving time of the lock requests, determining (S120; S340), by a second determining module of the lock arbitration server, whether a lock renewal request of the primary database is received, and in response to determining that the lock renewal request of the primary database is not received, selecting (S130; S350), by a first processing module of the lock arbitration server, a secondary database of the secondary databases as a new primary database seizing the lock, the selecting (S130; S350) comprising selecting, as the new primary database, the secondary database with the earliest receiving time, and controlling, by the first processing module, the primary database to be switched to the secondary database of the secondary databases. sending, by a first sending module of the lock arbitration server, a lock expiration notification to the secondary databases, receiving, by a record module of the lock arbitration server, lock requests sent by the secondary databases based on the lock expiration notification, and recording a receiving time of the lock requests, determining (S120; S340), by a second determining module of the lock arbitration server, whether a lock renewal request of the primary database is received, and in response to determining that the lock renewal request of the primary database is not received, selecting (S130; S350), by a first processing module of the lock arbitration server, a secondary database of the secondary databases as a new primary database seizing the lock, the selecting (S130; S350) comprising selecting, as the new primary database, the secondary database with the earliest receiving time, and controlling, by the first processing module, the primary database to be switched to the secondary database of the secondary databases.