Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Upgrading the vCloud Director database to version 5.1 fails with the error: Task failed due to uncaught exception |java.sql.SQLException: ORA-06550: line 5, column 77: PLS-00201: identifier 'DBMS_RANDOM' must be declared (2038825)

Symptoms

When upgrading to vCloud Director (vCD) 5.1, you experience these symptoms:
  • You are unable to upgrade the vCloud Director database to version 5.1
  • Upgrading the vCD database to version 5.1 fails
  • Running the ./upgrade script to upgrade the database fails
  • You see the error:

    Task failed due to uncaught exception |java.sql.SQLException: ORA-06550: line 5, column 77: PLS-00201: identifier 'DBMS_RANDOM' must be declared
  • In the upgrade.log file, located at /opt/vmware/vcloud-director/logs, you see entries similar to:

    2012-10-23 13:27:04,455 | WARN     | pool-1-thread-1           | SerialAggregateTask            | Steps to upgrade to 2.0.291: Task failed due to uncaught exception | java.sql.SQLException: ORA-06550: line 5, column 77:
    PLS-00201: identifier 'DBMS_RANDOM' must be declared
    ORA-06550: line 5, column 28:
    PL/SQL: Statement ignored

Cause

This issue may occur with the Oracle vCD database if the Oracle DBMS_RANDOM package is not installed or if the vcloud user does not have sufficient privileges to access the package.

Resolution

To resolve this issue, ensure that the DBMS_RANDOM package is installed and the vcloud user has sufficient privileges to access it.
 
To determine if the package is installed, run this SQL statement:

SELECT dbms_random.value(1,5) FROM DUAL;
 
After ensuring that the DBMS_RANDOM package is installed and the vcloud user can access it, rerun the upgrade script to upgrade vCD database schema:
  • If the original vCD 1.5.x database has been restored, you need to only rerun the upgrade script.
  • If there is no backup of the vCD 1.5.x database:
  1. Back up the current database.
  2. Run this SQL statement:

    SELECT * from config where name = 'database.schema.version';

    The VALUE field should be 2.0.290.transition.

  3. If the the VALUE field is not 2.0.290.transition, run this SQL statement to update the value:

    UPDATE config set value='2.0.290' where name='database.schema.version';
             commit;

  4. Rerun the vCD upgrade script.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 0 Ratings
Actions
KB: