US 12,204,558 B2
Failover of database sessions to a logical replica database
Carol Lyndall Colrain, Kansas City, KS (US); Xiaoli Qi, Palo Alto, CA (US); Kevin S. Neel, San Mateo, CA (US); Stephen J. Vivian, Londonderry, NH (US); Michael Cusson, Woburn, MA (US); Yunrui Li, Los Altos, CA (US); and Jonathan Giloni, Foster City, CA (US)
Assigned to Oracle International Corporation, Redwood Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Oct. 13, 2023, as Appl. No. 18/379,684.
Claims priority of provisional application 63/416,136, filed on Oct. 14, 2022.
Prior Publication US 2024/0126785 A1, Apr. 18, 2024
Int. Cl. G06F 16/27 (2019.01); G06F 11/20 (2006.01); G06F 16/23 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 16/275 (2019.01) [G06F 11/2023 (2013.01); G06F 16/2322 (2019.01); G06F 16/2379 (2019.01); G06F 16/2455 (2019.01); G06F 2201/80 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method comprising:
receiving, from a client system, a request to establish a new session at a logical replica database of a standby database server;
wherein the logical replica database is kept in synch with data of a primary database through logical replication of changes to the primary database;
wherein the new session is a failover session of an original session at the primary database of a primary database server;
prior to receiving the request to establish the new session:
the primary database server receiving a set of one or more commands in the original session, which, if completed in the original session, would cause performance of:
a first server operation that commits a transaction that includes the set of one or more commands,
a second server operation that generates and executes an SQL-based command for storing a commit-indication that indicates that the transaction was committed,
wherein the commit-indication is not stored until after the first server operation has committed the transaction and completed the set of commands,
replicating and executing the SQL-based command on the logical replica database, and thereby storing the commit-indication that indicates that the transaction was committed on the logical replica database;
receiving by the standby database server in the new session, from the client system, a request for an outcome of the set of one or more commands that were previously sent by the client system in the original session;
wherein the request, for the outcome, received by the standby database server includes the commit-indication to identify the set of one or more commands;
in response to the request for the outcome, determining, by the standby database server, based, at least in part, on existence of the commit-indication on the logical replica databases, whether the set of one or more commands has committed on the primary database and, thereby, successfully replicated to the logical replica database.