Error during timezone update in 11.2.0.4 to 12.2.0.1
Error:
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of
APPADMIN.PW_SYNC_AFTER_ALTER
ORA-06512: at "SYS.DBMS_DST", line 1139
ORA-06512: at "SYS.DBMS_DST", line 571
ORA-01031: insufficient privileges
Solution :
1. Backup the DDL for trigger APPADMIN.PW_SYNC_AFTER_ALTER..
2. Drop trigger APPADMIN.PW_SYNC_AFTER_ALTER, Make Sure applications are stopped.
3. And run the following again.
CONN / as sysdba
alter session set "_with_subquery"=materialize;
alter session set "_simple_view_merging"=TRUE;
set serveroutput on
VAR numfail number
BEGIN
DBMS_DST.UPGRADE_DATABASE(:numfail,
parallel => TRUE,
log_errors => TRUE,
log_errors_table => 'SYS.DST$ERROR_TABLE',
log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
error_on_overlap_time => FALSE,
error_on_nonexisting_time => FALSE);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
END;
/
VAR fail number
BEGIN
DBMS_DST.END_UPGRADE(:fail);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
END;
/
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
4) Create trigger APPADMIN.PW_SYNC_AFTER_ALTER
Trigger created
grant administer database trigger to appadmin;
Issue resolved.
Error:
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of
APPADMIN.PW_SYNC_AFTER_ALTER
ORA-06512: at "SYS.DBMS_DST", line 1139
ORA-06512: at "SYS.DBMS_DST", line 571
ORA-01031: insufficient privileges
Solution :
1. Backup the DDL for trigger APPADMIN.PW_SYNC_AFTER_ALTER..
2. Drop trigger APPADMIN.PW_SYNC_AFTER_ALTER, Make Sure applications are stopped.
3. And run the following again.
CONN / as sysdba
alter session set "_with_subquery"=materialize;
alter session set "_simple_view_merging"=TRUE;
set serveroutput on
VAR numfail number
BEGIN
DBMS_DST.UPGRADE_DATABASE(:numfail,
parallel => TRUE,
log_errors => TRUE,
log_errors_table => 'SYS.DST$ERROR_TABLE',
log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
error_on_overlap_time => FALSE,
error_on_nonexisting_time => FALSE);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
END;
/
VAR fail number
BEGIN
DBMS_DST.END_UPGRADE(:fail);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
END;
/
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
4) Create trigger APPADMIN.PW_SYNC_AFTER_ALTER
Trigger created
grant administer database trigger to appadmin;
Issue resolved.