Search notes:

ORA-14039: partitioning columns must form a subset of key columns of a UNIQUE index

Create a partitioned table:
create table tq84_ora_14039 (
    id_a    integer,
    id_b    integer,
    val_1   varchar2(10),
    val_2   number(10),
    val_3   date
    --
--  constraint tq84_ora_14039 primary key (id_a, id_b) using index local -- <== Throws ORA-14039
--  constraint tq84_ora_14039 primary key (id_a, id_b)                   -- <== OK
)
partition by range(val_2) interval (100000)
(
   partition tq84_ora_14039_part_1 values less than (0)
)
;
Trying to create the following index results in ORA-14039: partitioning columns must form a subset of key columns of a UNIQUE index:
alter table tq84_ora_14039 add primary key(id_a, id_b) using index local;
This statement is OK:
alter table tq84_ora_14039 add primary key(id_a, id_b);
The following two primary keys would also be OK.
The first one would create a non-aligned, the second one an aligned primary key:
alter table tq84_ora_14039 add primary key (val_1, val_2) using index local;
alter table tq84_ora_14039 add primary key (val_2, val_1) using index local;
Check alignment of indexes:
select alignment from user_part_indexes where table_name = 'TQ84_ORA_14039';
Cleaning up
drop table tq84_ora_14039;

See also

Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759473921, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-14039_partitioning-columns-must-form-a-subset-of-key-columns-of-a-UNIQUE-index(75): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78