Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-30 · container image gvenzl/oracle-free:23-slim
A global temporary table (GTT) created with ON COMMIT PRESERVE ROWS keeps each session's rows until the session ends. While any session has rows in it, ALTER TABLE ... ADD fails with ORA-14450.
The session holding the rows can be your own or another one. In both cases below, TRUNCATE TABLE in the session that had the rows let the ALTER succeed. For DROP TABLE and CREATE INDEX on a GTT in use, the error is ORA-14452 instead.
01Adding a column to a GTT that still has rows in this session
One row was inserted into tmp_calc and committed. ALTER TABLE tmp_calc ADD (memo VARCHAR2(20)) in the same session then failed with ORA-14450.
user_tables shows TEMPORARY = Y and DURATION = SYS$SESSION, so committed rows stay for the whole session. After TRUNCATE TABLE tmp_calc, the same ALTER returned "Table altered."
Setup
CREATE GLOBAL TEMPORARY TABLE tmp_calc (id NUMBER, amount NUMBER) ON COMMIT PRESERVE ROWS;Table created.INSERT INTO tmp_calc VALUES (1, 100);
COMMIT;
ALTER TABLE tmp_calc ADD (memo VARCHAR2(20));1 row created.
Commit complete.
ALTER TABLE tmp_calc ADD (memo VARCHAR2(20))
*
ERROR at line 1:
ORA-14450: attempt to access a transactional temp table already in use
Help: https://docs.oracle.com/error-help/db/ora-14450/COLUMN table_name FORMAT A10
COLUMN duration FORMAT A15
SELECT table_name, temporary, duration FROM user_tables WHERE table_name = 'TMP_CALC';TABLE_NAME T DURATION
---------- - ---------------
TMP_CALC Y SYS$SESSION
1 row selected.INSERT INTO tmp_calc VALUES (1, 100);
COMMIT;
TRUNCATE TABLE tmp_calc;
ALTER TABLE tmp_calc ADD (memo VARCHAR2(20));1 row created.
Commit complete.
Table truncated.
Table altered.02Another session still has rows in the GTT
Session A inserted and committed a row. Session B, logged in as the same user and with no rows of its own, ran the ALTER and got ORA-14450 right away (it did not wait).
When session A ran TRUNCATE TABLE tmp_calc, session B's ALTER succeeded.
Setup
CREATE GLOBAL TEMPORARY TABLE tmp_calc (id NUMBER, amount NUMBER) ON COMMIT PRESERVE ROWS;Table created.INSERT INTO tmp_calc VALUES (1, 100);
COMMIT;1 row created.
Commit complete.ALTER TABLE tmp_calc ADD (memo VARCHAR2(20));ALTER TABLE tmp_calc ADD (memo VARCHAR2(20))
*
ERROR at line 1:
ORA-14450: attempt to access a transactional temp table already in use
Help: https://docs.oracle.com/error-help/db/ora-14450/In production, the other session is often a pooled application connection. Those sessions need to truncate the table or disconnect before the ALTER.
INSERT INTO tmp_calc VALUES (1, 100);
COMMIT;1 row created.
Commit complete.TRUNCATE TABLE tmp_calc;Table truncated.ALTER TABLE tmp_calc ADD (memo VARCHAR2(20));Table altered.FAQ
What does ORA-14450 attempt to access a transactional temp table already in use mean?
Some session still has rows in the global temporary table. Until those rows are gone, DDL such as ALTER TABLE ADD is refused.
No one else is using the table. Why do I still get ORA-14450?
Your own session may hold the rows. With ON COMMIT PRESERVE ROWS, committed rows stay until the session ends. In our test, TRUNCATE in the same session fixed it.
Does ALTER TABLE wait for the other session?
No. In our test session B got ORA-14450 immediately while session A still had rows.
What is the difference between ORA-14450 and ORA-14452?
Both mean the GTT is in use. In our tests ALTER TABLE ADD gave ORA-14450, while DROP TABLE and CREATE INDEX gave ORA-14452.
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0