Oracle 26ai Blockchain Tables

Author: Paul Sammy Oracle Ace 12 March 2026

The word blockchain has become synonymous with cryptocurrencies like Bitcoin, but what is a blockchain? and what are the new Blockchain tables available in Oracle (since 21c).

What is a Blockchain?

If we look at the word Blockchain it is a compound word of Block and Chain. So the Block component is a discrete unit of encapsulation that contains our information and our data also called the ledger. The chain component links these blocks together. Now the actual linkage is key here a block in a chain has a reference based hash of and to the previous block. What this means is a block can’t be tampered with as if it was the hash would change and not match the previous blocks copy of the hash.

So key take away is that a Blockchain is a tamper proof set of linked data.

Also it should become clear due to the blockchain, blocks are immutable what that means is they can’t be updated as if we updated a block there that would set off a cascading need to recreate all previous hash values in all previous blocks. So blocks are generally only ever inserted. Can they be deleted without breaking the chain? normally no but in Oracle it is possible based on a time frame and use of an Oracle supplied package.

Oracle Blockchain Tables

Oracle 21c introduced block chain tables (VERSION v1 tables) and these have had enhancements in Oracle 26ai/23c (VERSION v2 tables) This blog will assume only version 2 tables with their enhancements are used.

Oracle Blockchain tables are as expected:

  • Tamper proof
  • Each row is a block in the chain storing the hash of the previous row to guarantee the chain

Rows in the blockchain table are linked only once the transaction commits, which makes sense in case we issue a rollback.

They are tables as such they can be partitioned but there are several restrictions

  • No Updates
  • No Merges
  • No Truncate
  • No Drop Partitions
  • Cannot be created in CDB$ROOT
  • datatypes not supported (are others):
    • ROWID
    • LONG
    • Object type
    • nested table
    • TIMESTAMP variations

Oracle Blockchain Table Attributes

When we create a Blockchain table in oracle we also specify

  • How long the table must be IDLE in units of DAYS (min 16) i.e. no changes before it can be dropped
    • Idle time applies to dropping the table, not deleting rows.
      • Table can only be dropped if it contains no rows
      • Table has been IDLE (no inserts) for n days
      • N <= blockchain_table_max_no_drop

NO DROP UNTIL <number> DAYS IDLE

  • How long the table in units of DAYS (min 16) before data can be deleted based on a time frame
    • Each row becomes eligible for purge N days after its own insert timestamp
    • Idle time has no effect on deletion
    • Deletion is only via DBMS_BLOCKCHAIN_TABLE.DELETE_EXPIRED_ROWS

NO DELETE UNTIL <number>DAYS AFTER INSERT

Settings for NO DELETE and NO DROP are limited by database level parameter that can be changed

  • blockchain_table_max_no_drop
    • maximum allowed NO DROP (default 16 unless set)
  • blockchain_table_retention_threshold
    • minimum allowed NO DELETE (default 16)

If the above 2 settings NO DELETE or NO DROP can ever be changed

  • LOCKED
  • If we do allow changes we can only ever increase values never reduce it

The hashing algorithm

  • SHA2_256| SHA2_384 | SHA2_512

The Blockchain version, this is mandatory but use v2 for Oracle 26ai

  • To use v2 tables COMPATIBLE = 23.0.0 or higher
  • VERSION v1 | VERSION v2

Oracle Blockchain Enhance Security

Blockchain tables support using a signature to sign data, so just like encryption using certificates to sign data to prove its authenticity, integrity and non repudiation. This is stored in the blockchain itself again to guarantee the chain has not been tampered. (Not covered further)


Oracle Blockchain demo

So I’m using an Oracle 26ai database to run these basic Blockchain tests.

  • Logon to a Oracle 26ai PDB as a user with create table privilege
  • Check database level Blockchain parameters, below we see default 16
show parameter blockchain
  • Create a block chain table
CREATE BLOCKCHAIN TABLE orademo.payments (
  payment_id    number,
  account_id    number,
  amount        number,
  currency      varchar2(128),
  created_at    timestamp default systimestamp
)
NO DROP UNTIL 16 DAYS IDLE
NO DELETE UNTIL 16 DAYS AFTER INSERT
HASHING USING SHA2_512
VERSION "v2"
/
  • View new table attributes, we see retention set to 16 and HASH algorithm we used.
set lines 280     
col table_name for a32
col DELETE_TIME for a16
select * from USER_BLOCKCHAIN_TABLES
/
  • Insert some data into our Blockchain table
INSERT INTO orademo.payments values (34243, 645323253, 1000.00,'GBP', systimestamp);
commit;
  • Try to update, delete data or drop table these should all fail due to rules in place.
UPDATE orademo.payments set AMOUNT=500.00 where PAYMENT_ID=34243 and ACCOUNT_ID=645323253;
delete from orademo.payments;
drop table orademo.payments;

Key Takeaways

  • Blockchain tables are append‑only and tamper resistant
  • Retention rules control when rows can be purged and when tables can be dropped
  • Oracle 26ai (23c) introduces VERSION v2 blockchain tables
  • Purging data is done only via DBMS_BLOCKCHAIN_TABLE.DELETE_EXPIRED_ROWS (not covered)
  • Updates, deletes, merges, truncates are not allowed