IP Library Granted Patent US 12675378
Granted Patent B2
US 12675378 · App. 18/893,868 · Granted Jul 7, 2026

Methods, systems, and computer program product for remapping database sessions

Inventors: Chandrajith Unnithan (Redwood Shores, CA); Wilson Chan (Redwood Shores, CA); Tak Wang (Redwood Shores, CA)
Assignee: Oracle International Corporation
G06F11/2025G06F9/5088G06F16/2255G06F16/285G06F2209/5016G06F2209/503
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12675378
App. No.
18/893,868
Granted
Jul 7, 2026
Kind
B2
Abstract

Disclosed is a method, a computer program product, and a computer system for remapping database sessions by first identifying a change in the cardinality of a database instances. A plurality of co-located database sessions may be assigned to a database instance of the database based at least in part upon the change in the cardinality of the database instances. Multiple database instances of a plurality of database instances in the database that respectively have one or more co-located database sessions of the plurality of co-located database sessions may be identified based at least in part upon a co-location data structure. At least one co-located database sessions of at least one database instance of the multiple database instances may be terminated.

Claims (79)

1 . A method comprising:

identifying a change in a cardinality of a database;

assigning a new database session to a database instance of the database based at least in part upon the change in the cardinality of the database;

determining one or more co-located database sessions for at least one database instance of multiple database instances, using a checker process for the database, wherein

the checker process comprises a plurality of local checker processes each of which receives local data from each database instance of the plurality of database instances to provide each database instance with a global view of the plurality of database instances,

at least one of the plurality of local checker processes detects, using the local data collected from the plurality of database instances, whether more than one database instance in the plurality of database instances has at least one co-located database session of the plurality of co-located database sessions,

a co-located database session includes a database session that has been tagged to co-execute on a same computing node while the database session can execute on the same computing node or on a different computing node, and the co-located database session is tagged either before the change in the cardinality of the database occurs or after the change occurs;

identifying, based at least in part upon a co-location data structure, multiple database instances of a plurality of database instances in the database that have the same co-location tag as the new database session and that respectively have one or more co-located database sessions of a plurality of co-located database sessions, wherein

the co-location data structure stores therein an n-tuple that further comprises a first information pertaining to a database instance of the plurality of database instances and a second information pertaining to hashing of a co-location tag, and

the co-location tag comprises a parameter that is used with a connect tag parameter to route co-located database sessions having the co-location tag to a single database instance of the plurality of database instances; and

terminating at least one co-located database session of at least one database instance of the multiple database instances.

2 . The method of claim 1 , wherein

the checker process is a single centralized checker process that detects, using global data collected from the plurality of database instances, whether two or more database instances of the plurality of database instances have at least one co-located database session of the plurality of co-located database sessions, and

the cardinality includes a total count of database instances in a database cluster for the database.

3 . The method of claim 1 , further comprising:

labeling, marking, or tagging the one or more co-located database sessions for the at least one database instance of the multiple database instances, wherein

each co-located database session of the one or more co-located database sessions is labeled, marked, or tagged with information pertaining to a respective termination method, which, when executed, terminates respective co-located database sessions.

4 . The method of claim 1 , wherein the termination method for a specific co-location database session is determined by performing at least two of:

analyzing the at least one database instance to determine whether the graceful termination method applies;

analyzing the at least one database instance to determine whether the planned failover termination method applies;

analyzing the at least one database instance to determine whether the forced failover termination method applies; and

analyzing the at least one database instance to determine whether the forcible termination method applies.

5 . The method of claim 3 , wherein respective termination methods for respective co-located database sessions are determined or selected from a plurality of different termination methods comprising:

a graceful kill termination method,

a planned failover termination method,

a forced failover termination method, and

a forcible termination method.

6 . A system, comprising:

a processor or processor core; and

a memory for holding programmable code which, when executed, causes the processor or processor core to perform a set of acts, the set of acts comprising:

identifying a change in a cardinality of a database;

assigning a new database session to a database instance of the database based at least in part upon the change in the cardinality of the database;

determining one or more co-located database sessions for at least one database instance of multiple database instances, using a checker process for the database, wherein

the checker process comprises a plurality of local checker processes each of which receives local data from each database instance of the plurality of database instances to provide each database instance with a global view of the plurality of database instances,

at least one of the plurality of local checker processes detects, using the local data collected from the plurality of database instances, whether more than one database instance in the plurality of database instances has at least one co-located database session of the plurality of co-located database sessions,

a co-located database session includes a database session that has been tagged to co-execute on a same computing node while the database session can execute on the same computing node or on a different computing node, and the co-located database session is tagged either before the change in the cardinality of the database occurs or after the change occurs;

identifying, based at least in part upon a co-location data structure, multiple database instances of a plurality of database instances in the database that have the same co-location tag as the new database session and that respectively have one or more co-located database sessions of a plurality of co-located database sessions, wherein

the co-location data structure stores therein an n-tuple that further comprises a first information pertaining to a database instance of the plurality of database instances and a second information pertaining to hashing of a co-location tag, and

the co-location tag comprises a parameter that is used with a connect tag parameter to route co-located database sessions having the co-location tag to a single database instance of the plurality of database instances; and

terminating at least one co-located database session of at least one database instance of the multiple database instances.

7 . The system of claim 6 , wherein the checker process is a single centralized checker process that detects, using global data collected from the plurality of database instances, whether more than one database instance of the plurality of database instances has at least one co-located database session of the plurality of co-located database sessions.

8 . The system of claim 6 , wherein the memory holding the programmable code which, when executed, causes the processor or processor core to perform the set of acts, the set of acts further comprising:

labeling, marking, or tagging the one or more co-located database sessions for the at least one database instance of the multiple database instances, wherein

each co-located database session of the one or more co-located database sessions is labeled, marked, or tagged with information pertaining to a respective termination method, which, when executed, terminates respective co-located database sessions.

9 . The system of claim 8 , wherein respective termination methods for respective co-located database sessions are determined or selected from a plurality of different termination methods comprising:

a graceful kill termination method,

a planned failover termination method,

a forced failover termination method, and

a forcible termination method.

10 . The system of claim 9 , wherein the system determines the termination method for a specific co-location database session by performing at least two of:

analyzing the at least one database instance to determine whether the graceful termination method applies;

analyzing the at least one database instance to determine whether the planned failover termination method applies;

analyzing the at least one database instance to determine whether the forced failover termination method applies; and

analyzing the at least one database instance to determine whether the forcible termination method applies.

11 . A non-transitory physical computer readable medium having stored thereon a sequence of instructions which, when executed by a processor or processor core, causes the processor or processor core to perform a set of acts, the set of acts comprising:

identifying a change in a cardinality of a database;

assigning a new database session to a database instance of the database based at least in part upon the change in the cardinality of the database;

determining one or more co-located database sessions for at least one database instance of multiple database instances, using a checker process for the database, wherein

the checker process comprises a plurality of local checker processes each of which receives local data from each database instance of the plurality of database instances to provide each database instance with a global view of the plurality of database instances,

at least one of the plurality of local checker processes detects, using the local data collected from the plurality of database instances, whether more than one database instance in the plurality of database instances has at least one co-located database session of the plurality of co-located database sessions,

a co-located database session includes a database session that has been tagged to co-execute on a same computing node while the database session can execute on the same computing node or on a different computing node, and the co-located database session is tagged either before the change in the cardinality of the database occurs or after the change occurs;

identifying, based at least in part upon a co-location data structure, multiple database instances of a plurality of database instances in the database that have the same co-location tag as the new database session and that respectively have one or more co-located database sessions of a plurality of co-located database sessions, wherein

the co-location data structure stores therein an n-tuple that further comprises a first information pertaining to a database instance of the plurality of database instances and a second information pertaining to hashing of a co-location tag, and

the co-location tag comprises a parameter that is used with a connect tag parameter to route co-located database sessions having the co-location tag to a single database instance of the plurality of database instances; and

terminating at least one co-located database session of at least one database instance of the multiple database instances.

12 . The non-transitory-physical computer readable medium of claim 11 , wherein the checker process is a single centralized checker process that detects, using global data collected from the plurality of database instances, whether more than one database instance of the plurality of database instances has at least one co-located database session of the plurality of co-located database sessions.

13 . The non-transitory-physical computer readable medium of claim 11 having stored thereupon the sequence of instructions which, when executed by the processor or processor core, causes the processor or processor core to perform the set of acts, the set of acts further comprising:

labeling, marking, or tagging the one or more co-located database sessions for the at least one database instance of the multiple database instances, wherein

each co-located database session of the one or more co-located database sessions is labeled, marked, or tagged with information pertaining to a respective termination method, which, when executed, terminates respective co-located database sessions.

14 . The non-transitory-physical computer readable medium of claim 13 , wherein respective termination methods for respective co-located database sessions are determined or selected from a plurality of different termination methods comprising:

a graceful kill termination method,

a planned failover termination method,

a forced failover termination method, and

a forcible termination method.

15 . The non-transitory-physical computer readable medium of claim 14 , wherein the termination method for a specific co-location database session is determined by performing at least two of:

analyzing the at least one database instance to determine whether the graceful termination method applies;

analyzing the at least one database instance to determine whether the planned failover termination method applies;

analyzing the at least one database instance to determine whether the forced failover termination method applies; and

analyzing the at least one database instance to determine whether the forcible termination method applies.