Oracle Database Invalid SYS Object Compile
Bu yazımda sys schemasına ait olan bütün objelerin invalid durumdan nasıl valid duruma getireleceğini anlatacağım.
1.startup upgrade
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
shutdown immediate;
2. startup upgrade
—ORA-04063: package body “SYS.DBMS_STATS_INTERNAL” has errors—
@?/rdbms/admin/dbmsstat.sql
@?/rdbms/admin/prvtstas.plb
@?/rdbms/admin/prvtstat.plb
@?/rdbms/admin/catupgrd.sql;
shutdown immediate;
3. startup;
— Schema level—
EXEC UTL_RECOMP.recomp_serial(‘SYS’);
EXEC UTL_RECOMP.recomp_parallel(4, ‘SYS’);
— Database level—
EXEC UTL_RECOMP.recomp_serial();
EXEC UTL_RECOMP.recomp_parallel(4); >> Run
Shutdown immediate;
4. startup upgrade;
@?/rdbms/admin/catupgrd.sql;
Shutdown immediate;
5. startup;
EXEC UTL_RECOMP.recomp_parallel(4);
Alternative Olarak
1. Drop the synonym:
SQL> drop public synonym XMLCONCAT;
2. Recompile the package
SQL> alter package DBMS_SQLTUNE_INTERNAL compile body;
İşlemler Sonunda aşağıdaki ora hatalarını alıyorsak eğer,
SQL> @?/rdbms/admin/catnoqm.sql;
çalıştırmamız gerekmekte
—ERROR at line 1:—
ORA-04063: package body “SYS.DBMS_INTERNAL_LOGSTDBY” has errors
ORA-06508: PL/SQL: could not find program unit being called:
“SYS.DBMS_INTERNAL_LOGSTDBY”
ORA-06512: at “SYS.UTL_RECOMP”, line 863
ORA-04063: package body “SYS.DBMS_INTERNAL_LOGSTDBY” has errors
ORA-06508: PL/SQL: could not find program unit being called:
“SYS.DBMS_INTERNAL_LOGSTDBY”
ORA-06512: at line 1