19 upgrade fails with error ORA-04045: errors during recompilation/revalidation of CTXSYS.CONTEXT
(Doc ID 2811231.1)
Last updated on JULY 20, 2024
Applies to:
Oracle Database - Enterprise Edition - Version 19.3.0.0.0 and laterInformation in this document applies to any platform.
Symptoms
11gR2 DB upgrade to 19c fails with error -
SQL> DECLARE
2 ddlstr varchar2(32767);
3
4 CURSOR pkey_cons_csr IS
5 select u.name user_name, o.name tbl_name, cd.enabled
6 from cdef$ cd, ccol$ cc, col$ cl, obj$ o, user$ u
7 where cl.obj# = cd.obj#
8 and cc.intcol# = cl.intcol#
9 and cd.con# = cc.con#
10 and cd.type# = 2
11 and bitand(cl.property, 1073741824) = 1073741824
12 and cd.obj# = o.obj#
13 and o.owner# = u.user#
14 and not exists (select * from recyclebin$ rb where rb.obj# = cd.obj#)
15 order by 1, 2;
16
17 BEGIN
18
19 FOR pkey_rec in pkey_cons_csr
20 LOOP
21 IF pkey_rec.enabled is NULL
22 THEN
23 ddlstr := 'ALTER TABLE ' ||
24 DBMS_ASSERT.ENQUOTE_NAME(pkey_rec.user_name, false) || '.' ||
25 DBMS_ASSERT.ENQUOTE_NAME(pkey_rec.tbl_name, false) ||
26 ' DISABLE PRIMARY KEY';
27 ELSE
28 ddlstr := 'ALTER TABLE ' ||
29 dbms_assert.enquote_name(pkey_rec.user_name, false) || '.' ||
30 dbms_assert.enquote_name(pkey_rec.tbl_name, false) ||
31 ' ENABLE PRIMARY KEY';
32 END IF;
33
34 EXECUTE IMMEDIATE ddlstr;
35 END LOOP;
36 END;
37 /
DECLARE
*
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of CTXSYS.CONTEXT
ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-905: object CTXSYS.CTX_CONTAINS is invalid
ORA-06512: at line 34
ORA-06512: at line 34
2 ddlstr varchar2(32767);
3
4 CURSOR pkey_cons_csr IS
5 select u.name user_name, o.name tbl_name, cd.enabled
6 from cdef$ cd, ccol$ cc, col$ cl, obj$ o, user$ u
7 where cl.obj# = cd.obj#
8 and cc.intcol# = cl.intcol#
9 and cd.con# = cc.con#
10 and cd.type# = 2
11 and bitand(cl.property, 1073741824) = 1073741824
12 and cd.obj# = o.obj#
13 and o.owner# = u.user#
14 and not exists (select * from recyclebin$ rb where rb.obj# = cd.obj#)
15 order by 1, 2;
16
17 BEGIN
18
19 FOR pkey_rec in pkey_cons_csr
20 LOOP
21 IF pkey_rec.enabled is NULL
22 THEN
23 ddlstr := 'ALTER TABLE ' ||
24 DBMS_ASSERT.ENQUOTE_NAME(pkey_rec.user_name, false) || '.' ||
25 DBMS_ASSERT.ENQUOTE_NAME(pkey_rec.tbl_name, false) ||
26 ' DISABLE PRIMARY KEY';
27 ELSE
28 ddlstr := 'ALTER TABLE ' ||
29 dbms_assert.enquote_name(pkey_rec.user_name, false) || '.' ||
30 dbms_assert.enquote_name(pkey_rec.tbl_name, false) ||
31 ' ENABLE PRIMARY KEY';
32 END IF;
33
34 EXECUTE IMMEDIATE ddlstr;
35 END LOOP;
36 END;
37 /
DECLARE
*
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of CTXSYS.CONTEXT
ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-905: object CTXSYS.CTX_CONTAINS is invalid
ORA-06512: at line 34
ORA-06512: at line 34
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |