Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
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;
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:
-
Back up the current database.
-
Run this SQL statement:
SELECT * from config where name = 'database.schema.version';
The VALUE field should be 2.0.290.transition. -
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; -
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.
Actions
KB:
- Updated:
- Categories:
- Languages:
- Product Family:
- Product(s):
- Product Version(s):

