'ORA-00001: unique constraint (SYS.WRH$_OPTIMIZER_ENV_PK)' Violated When AWR Snapshots Creation (Doc ID 2282689.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

ORA-00001: unique constraint (SYS.WRH$_OPTIMIZER_ENV_PK) violated error happpend,
is occurring at the moment of AWR snapshots creation.

・AWR Snapshots creation is sucessful.
・From DBA_HIST_SNAP_ERROR/WRM$_SNAP_ERROR shows ERROR_NUMBER is 1:

Changes

After applying DATABASE BUNDLE PATCH: 12.1.0.2.170117 (24732088) 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms