# US 2026/0064641 A1 · Efficient Online Schema Upgrade In Distributed Databases

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064641 A1
- Document ID: US20260064641A1
- Status: Published application
- Kind: A1
- Application number: 18/820,858
- Filed: 2024-08-30
- Published: 2026-03-05
- Earliest claimed: 2024-08-30
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Lik Wong; Leonid Novak; Sampanna Salunke; Mark Dilman; Wei-Ming Hu
- Web page: https://patentgrep.com/patent/US20260064641A1

## CPC

- G06F 16/213: {with details for schema evolution support}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method includes performing a schema upgrade in a sharded database of a distributed system, by replacing in each shard a first version of a database schema with a second version of the database schema. The schema upgrade is performed for the first and second shards asynchronously, resulting in first and second versions of an application executing simultaneously with the first and second versions of the database schema respectively. The method also includes preventing execution of a change against a first shard on which the schema upgrade has been performed while the schema upgrade has not been performed on a second shard, in a case where the change is not compliant with the first version of the database schema. On completion of the schema upgrade in one of the shards, the upgraded schema becomes readable for an application using that shard.

## Claims

### Claim 1

A method comprising:
receiving a request for a schema upgrade in a replicated database system comprising a first database server hosting a first replica in a first database and a second database server hosting a second replica within a second database, wherein the schema upgrade changes a first version of a database schema that defines one or more database objects stored in the first database to a second version of the database schema;
performing the schema upgrade asynchronously, resulting in the second database being upgraded to the second version before the first database is upgraded to the second version; and
during a schema upgrade window in which the schema upgrade of the first database is not completed:
said first database server executing a first data manipulation language (DML) change against the first replica, said first DML change specifying a first change to a particular database object;
generating a first logical change record (LCR) that specifies said first DML change;
applying by said second database server said first LCR against said second replica;
said second database server executing a second DML change against the second replica, said second DML change specifying a second change to said particular database object;
generating a second LCR that specifies said second DML change;
applying by said first database server said second LCR against said first replica; and
said second database server preventing a third DML change against said second replica in response to determining that said third DML change is incompatible with the first version of the database schema.

### Claim 2 (depends on 1)

The method of claim 1, wherein the schema upgrade adds a new table column that is not defined by said first version and for which a default column value is defined by the second version, wherein said second DML change inserts a row into a table for which the new table column is defined by the second version.

### Claim 3 (depends on 2)

The method of claim 2, wherein during said schema upgrade window, said second database server preventing executing of a DML change that sets said new table column to a column value different than said default column value.

### Claim 4 (depends on 1)

The method of claim 1, wherein said first version defines a first name of a table column and said second version specifies a second name for said table column different than said first name, where said second DML change modifies said table column using said second name, wherein said first database server applies said second DML change using said first name.

### Claim 5 (depends on 1)

The method of claim 1, wherein said first version defines a first name of a table column and said second version specifies a second name for said table column different than said first name, where said first DML change modifies said table column using said first name, wherein said second database server applies said first DML change using said second name.

### Claim 6 (depends on 1)

The method of claim 1, wherein said first version defines a first name of a table and said second version specifies a second name for said table different than said first name, wherein said second DML change modifies said table using said second name, wherein said first database server applies said second DML change using said first name.

### Claim 7 (depends on 2)

The method of claim 2, wherein said first version defines a first name of a table and said second version specifies a second name for said table different than said first name, wherein said first DML change modifies said table using said first name, wherein said second database server applies said first DML change using said second name.

### Claim 8 (depends on 1)

The method of claim 1, wherein:
the schema upgrade drops a certain database object in said second version;
the method further includes:
said first database server executing another DML change against the first replica, said another DML change specifying another change to said certain database object;
said first database server generating another LCR that specifies said another DML change;
said second database server ignoring said another DML change when processing said another LCR.

### Claim 9 (depends on 1)

The method of claim 1, wherein:
the schema upgrade drops a table;
the method further includes:
said first database server executing another DML change against the first replica, said another DML change specifying another change to said table;
said first database server generating another LCR that specifies said another DML change;
said second database server ignoring said another DML change when processing said another LCR.

### Claim 10 (depends on 1)

The method of claim 1, wherein:
the schema upgrade drops a table column of a table;
the method further includes:
said first database server executing another DML change against the first replica, said another DML inserting a row into said table;
said first database server generating another LCR that specifies said another DML change;
said second database server inserting said row into said table, said inserting including inserting a default value into said table column.

### Claim 11 (depends on 1)

The method of claim 1, wherein:
the schema upgrade drops a table column of a table;
the method further includes:
said first database server executing another DML change against the first replica, said another DML change inserting a row into said table;
generating another LCR that specifies said another DML change;
said second database server encountering a not-null constraint violation when applying said another LCR
in response to encountering a not-null constraint violation, said second database server pausing applying LCRs from said first database server during said schema upgrade window.

### Claim 12 (depends on 1)

The method of claim 1, wherein:
said first version defines a first size of a table column and said second version defines a second size for said table column larger than said first size;
said second DML change changes said table column;
wherein said second database server enforces said first size for said table column when making said second DML change.

### Claim 13 (depends on 1)

The method of claim 1, wherein:
said schema upgrade adds a constraint to a table column of a table;
said first DML change changes said table column; and
said first database server enforcing said constraint for said table column when making said first DML change.

### Claim 14 (depends on 1)

The method of claim 1,
wherein said second version of the database schema defines a new constraint on said particular database object; and
where said first database system checks said new constraint when executing said first DML change.

### Claim 15

One or more non-transitory storage media storing sequences of instructions that, when executed by one or more computing devices, cause:
receiving a request for a schema upgrade in a replicated database system comprising a first database server hosting a first replica in a first database and a second database server hosting a second replica within a second database, wherein the schema upgrade changes a first version of a database schema that defines one or more database objects stored in the first database to a second version of the database schema;
performing the schema upgrade asynchronously, resulting in the second database being upgraded to the second version before the first database is upgraded to the second version; and
during a schema upgrade window in which the schema upgrade of the first database is not completed:
said first database server executing a first data manipulation language (DML) change against the first replica, said first DML change specifying a first change to a particular database object;
generating a first logical change record (LCR) that specifies said first DML change;
applying by said second database server said first LCR against said second replica;
said second database server executing a second DML change against the second replica, said second DML change specifying a second change to said particular database object;
generating a second LCR that specifies said second DML change;
applying by said first database server said second LCR against said first replica; and
said second database server preventing a third DML change against said second replica in response to determining that said third DML change is incompatible with the first version of the database schema.

### Claim 16 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein the schema upgrade adds a new table column that is not defined by said first version and for which a default column value is defined by the second version, wherein said second DML change inserts a row into a table for which the new table column is defined by the second version.

### Claim 17 (depends on 16)

The one or more non-transitory storage media of claim 16, wherein the one or more sequences of instructions include instructions, that when executed by one or more computing devices, cause during said schema upgrade window, said second database server preventing executing of a DML change that sets said new table column to a column value different than said default column value.

### Claim 18 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein said first version defines a first name of a table column and said second version specifies a second name for said table column different than said first name, where said second DML change modifies said table column using said second name, wherein said first database server applies said second DML change using said first name.

### Claim 19 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein said first version defines a first name of a table column and said second version specifies a second name for said table column different than said first name, where said first DML change modifies said table column using said first name, wherein said second database server applies said first DML change using said second name.

### Claim 20 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein said first version defines a first name of a table and said second version specifies a second name for said table different than said first name, wherein said second DML change modifies said table using said second name, wherein said first database server applies said second DML change using said first name.

### Claim 21 (depends on 16)

The one or more non-transitory storage media of claim 16, wherein said first version defines a first name of a table and said second version specifies a second name for said table different than said first name, wherein said first DML change modifies said table using said first name, wherein said second database server applies said first DML change using said second name.

### Claim 22 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein:
the schema upgrade drops a certain database object in said second version;
wherein the one or more sequences of instructions include instructions, that when executed by one or more computing devices, cause:
said first database server executing another DML change against the first replica, said another DML change specifying another change to said certain database object;
said first database server generating another LCR that specifies said another DML change;
said second database server ignoring said another DML change when processing said another LCR.

### Claim 23 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein:
the schema upgrade drops a table;
wherein the one or more sequences of instructions include instructions, that when executed by one or more computing devices, cause:
said first database server executing another DML change against the first replica, said another DML change specifying another change to said table;
said first database server generating another LCR that specifies said another DML change;
said second database server ignoring said another DML change when processing said another LCR.

### Claim 24 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein:
the schema upgrade drops a table column of a table;
wherein the one or more sequences of instructions include instructions, that when executed by one or more computing devices, cause:
said first database server executing another DML change against the first replica, said another DML inserting a row into said table;
said first database server generating another LCR that specifies said another DML change;
said second database server inserting said row into said table, said inserting including inserting a default value into said table column.

### Claim 25 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein:
the schema upgrade drops a table column of a table;
wherein the one or more sequences of instructions include instructions, that when executed by one or more computing devices, cause:
said first database server executing another DML change against the first replica, said another DML change inserting a row into said table;
generating another LCR that specifies said another DML change;
said second database server encountering a not-null constraint violation when applying said another LCR
in response to encountering a not-null constraint violation, said second database server pausing applying LCRs from said first database server during said schema upgrade window.

### Claim 26 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein:
said first version defines a first size of a table column and said second version defines a second size for said table column larger than said first size;
said second DML change changes said table column;
wherein said second database server enforces said first size for said table column when making said second DML change.

### Claim 27 (depends on 15)

The one or more non-transitory storage media of claim 15, wherein:
said schema upgrade adds a constraint to a table column of a table;
said first DML change changes said table column; and
said first database server enforcing said constraint for said table column when making said first DML change.

### Claim 28 (depends on 15)

The one or more non-transitory storage media of claim 15,
wherein said second version of the database schema defines a new constraint on said particular database object; and
where said first database system checks said new constraint when executing said first DML change.
