OMS Upgrade Fails At Repository Configuration With Error ORA-20251

Yesterday, one of my blog readers asked me how I didn’t encounter ORA-20251 error when upgrading my EM12c to EM13c. He also pointed My Oracle Support document (Doc ID 2095025.1). The document says a new record will be inserted into EM_COST_CENTERS table (in fact the table name is EM_COST_CENTERS_E but it’s not important) for all users whose department value is not blank during the upgrade. If there are more than one records with blank cost center then the second record will be considered as duplicate, resulting in the above error during the repository configuration.

Here’s the sample output:

I asked my reader to examine the EM users and he said there are not any EM users whose department value is not blank. So today, I examined the upgrade script and see that it’s not just about the department value. The upgrade scrip also tries to insert new “cost center” records for the users whose Line of business value is not blank.

Here’s the list of my EM users:

As you can see, there’s only one user whose department and line of business values are not blank. The upgrade script (cost_center_data_upgrade.sql) will create a new cost center for the department of this user, and there won’t be any error. On the other hand, if there were another user whose cost center value is blank but department or line of business value is not blank, the script would try to create another cost center and it would cause a duplicate record violating unique constraint (COST_CENTER_NAME, TENANT_ID) on EM_COST_CENTERS_E table.

So before you upgrade the EM13c, you better check your users with the following command (I break the line so it can fit to the page, you can write it as one-line):

If there are multiple users with department or line of business value but not assigned to a cost center, you will hit the bug. Unfortunately, the My Oracle Support document doesn’t provide clear instructions to fix the problem. I recommend you to contact support and ask them to update the document (Doc ID 2095025.1). Meanwhile, if you feel adventurous, you may use a script similar to the below one, to set department value (or line of business value) to cost center value:

Before executing the script:

After the executing the script:

After assigning cost centers to the users, the upgrade script will work without getting any error.

Please share
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Gokhan Atil is a database administrator who has hands-on experience with both RDBMS and noSQL databases, and strong background on software development. He is certified as Oracle Certified Professional (OCP) and is awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for his continuous contributions to the Oracle users community.

2 Comments

  1. AlexVin

    I wrote the script, which at the time of installation determines whether the file has appeared, and replaces it with the text as described in 2095025.1

Leave Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.