Dear all,
I got an error while upgrade 1.5.1 from 1.5.0.
]0;root@vcloud:/home/iconsys[root@vcloud iconsys]# /opt/vmware/vcloud-director/bin/upgrade
Welcome to the vCloud Director upgrade utility
This utility will apply several updates to the database. Please
ensure you have created a backup of your database prior to continuing.
Do you wish to upgrade the product now? [Y/N] y
Examining database at URL: jdbc:oracle:thin:@192.168.1.26:1521/orcl
Applying 1 upgrade batches
Executing upgrade batch: 1.5 to 1.5.1
Executing SQL statements from file: Upgrade_Data_15_151.sql [17 statements]
..............Unable to upgrade the database: java.sql.SQLException: Error executing SQL statement: "CALL create_missing_index()"
--Upgrade.log
2012-03-28 00:46:26,490 | INFO | main | UpgradeAgent | Welcome to the vCloud Director upgrade utility
This utility will apply several updates to the database. Please
ensure you have created a backup of your database prior to continuing.
|
2012-03-28 00:46:28,920 | INFO | main | UpgradeAgent | Examining database at URL: jdbc:oracle:thin:@192.168.168.216:1521/orcl |
2012-03-28 00:46:30,453 | INFO | main | UpgradeAgent | Applying 1 upgrade batches |
2012-03-28 00:46:30,453 | INFO | main | UpgradeAgent | Executing upgrade batch: 1.5 to 1.5.1 |
2012-03-28 00:46:34,464 | ERROR | main | UpgradeAgent | Unable to upgrade the database: java.sql.SQLException: Error executing SQL statement: "CALL create_missing_index()" |
com.vmware.vcloud.upgrade.UpgradeAgentException: java.sql.SQLException: Error executing SQL statement: "CALL create_missing_index()"
at com.vmware.vcloud.upgrade.UpgradeAgent.executeUpgrade(UpgradeAgent.java:393)
at com.vmware.vcloud.upgrade.UpgradeAgent.start(UpgradeAgent.java:535)
at com.vmware.vcloud.upgrade.UpgradeAgent.main(UpgradeAgent.java:449)
Caused by: java.sql.SQLException: Error executing SQL statement: "CALL create_missing_index()"
at com.vmware.vcloud.common.install.SQLScriptExecutor.executeStatements(SQLScriptExecutor.java:134)
at com.vmware.vcloud.common.install.SQLScriptExecutor.executeSqlBatch(SQLScriptExecutor.java:95)
at com.vmware.vcloud.upgrade.UpgradeAgent.applySQLBatches(UpgradeAgent.java:742)
at com.vmware.vcloud.upgrade.UpgradeAgent.executeUpgrade(UpgradeAgent.java:384)
... 2 more
Caused by: java.sql.SQLException: ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
ORA-06512: at "VCLOUDUSER.CREATE_MISSING_INDEX", line 17
thank you very much!
-david
Please try running the following
SELECT object_id, object_type, category, condition, count(*) AS dups FROM
object_condition GROUP BY object_id, object_type, category, condition HAVING
count(*) > 1;
if you find duplicated run this
DELETE FROM object_condition WHERE object_id IN (SELECT object_id FROM object_condition GROUP BY object_id, object_type, category, condition HAVING count(*) > 1);
good luck
Please try running the following
SELECT object_id, object_type, category, condition, count(*) AS dups FROM
object_condition GROUP BY object_id, object_type, category, condition HAVING
count(*) > 1;
if you find duplicated run this
DELETE FROM object_condition WHERE object_id IN (SELECT object_id FROM object_condition GROUP BY object_id, object_type, category, condition HAVING count(*) > 1);
good luck