A method in a database system comprising a primary site, wherein the primary site further comprises an application server that writes data to a primary database and reads data from the primary database when the primary database is available, the method comprising: automatically detecting, by a self-healing module, unavailability of the primary database; determining, by the self-healing module, whether a standby database at the primary site is available, wherein the standby database is a replica of the primary database; temporarily allowing the application server to have read-only access from the standby database at the primary site when the self-healing module determines that the standby database is available at the primary site; and automatically initiating a failover processing sequence by the self-healing module when the self-healing module detects that the primary database is unavailable and determines that the standby database is available, wherein the failover processing sequence comprises: automatically enabling the standby database as readable and writable and assigning the standby database the role of primary database at the primary site to start replicating data to other standby databases; and after a failover role transition, using a pre-established connection between the application server and the standby database to allow the application server to read data from the standby database and to write data to the standby database resulting in the standby database assuming the role of the primary database at the primary site. automatically detecting, by a self-healing module, unavailability of the primary database; determining, by the self-healing module, whether a standby database at the primary site is available, wherein the standby database is a replica of the primary database; temporarily allowing the application server to have read-only access from the standby database at the primary site when the self-healing module determines that the standby database is available at the primary site; and automatically initiating a failover processing sequence by the self-healing module when the self-healing module detects that the primary database is unavailable and determines that the standby database is available, wherein the failover processing sequence comprises: automatically enabling the standby database as readable and writable and assigning the standby database the role of primary database at the primary site to start replicating data to other standby databases; and after a failover role transition, using a pre-established connection between the application server and the standby database to allow the application server to read data from the standby database and to write data to the standby database resulting in the standby database assuming the role of the primary database at the primary site. automatically enabling the standby database as readable and writable and assigning the standby database the role of primary database at the primary site to start replicating data to other standby databases; and after a failover role transition, using a pre-established connection between the application server and the standby database to allow the application server to read data from the standby database and to write data to the standby database resulting in the standby database assuming the role of the primary database at the primary site.