Hi when whe update the VC from 2.0.1 to 2.0.2 Next error massage is placed on in de vpxd-0 VC will not install and will rollback.
More info welcome
==========================================================================
Log for VMware VirtualCenter, pid=3664, version=2.0.2, build=build-50618, option=Release, section=1
Current working directory: C:\WINDOWS\system32
Vmacore::InitSSL: doVersionCheck = true, handshakeTimeoutUs = 120000000
NFC connection accept timeout: 180000 milliseconds
NFC request timeout: 180000 milliseconds
NFC read timeout: 60000 milliseconds
NFC write timeout: 600000 milliseconds
SQL execution failed with return code 1 : /* *************************************************************************
Copyright 2004 VMware, Inc. All rights reserved. -- VMware Confidential
*************************************************************************/
/*==================================================================
rollup_oracle.sql
vpx_stats_rollup procedure is called by vpxd to roll up stat
samples from one interval to another. This script processes the
stats data by first selecting all the stats data for all entities
that require to do the rollup. It iterates through the stats
sample by entity id, stat id, stat type and device to do the
rollup accordingly. The actual rollup takes place inside
another another store procedure 'rollup_sample_group'.
This store procedure is called by this script to aggregate
a group of stat samples to one.
=================================================================/
CREATE OR REPLACE PROCEDURE vpx_stats_rollup(
source_interval_len IN BINARY_INTEGER, -- source interval length
target_interval_len IN BINARY_INTEGER, -- target interval length
entity_delay_len IN NUMBER, -- entity delay length
statId_delay_len IN NUMBER, -- statId delay length
historical_included IN BINARY_INTEGER) -- include all historical data
IS
/* stat types */
TYPE_CUMULATIVE CONSTANT BINARY_INTEGER := 2;
TYPE_DELTA CONSTANT BINARY_INTEGER := 1;
TYPE_AVERAGE CONSTANT BINARY_INTEGER := 0;
/* stat_rec uniquely identifies one stat type for one entity over time */
TYPE stat_rec IS RECORD(
stat_id BINARY_INTEGER, -- stat id
stat_type BINARY_INTEGER, -- stat type
entity_id BINARY_INTEGER, -- entity id
device_id VPX_HIST_STAT.DEVICE_ID%TYPE); -- device id
/* sample_list is a list of sample values indexed by sample ids */
TYPE sample_list IS TABLE OF BINARY_INTEGER INDEX BY BINARY_INTEGER;
start_sample_time DATE; -- start of the target interval
target_sample_int BINARY_INTEGER; -- target sample interval
source_sample_int BINARY_INTEGER; -- source sample interval
stat_id BINARY_INTEGER; -- stat id
stat_type BINARY_INTEGER; -- stat type
entity_id BINARY_INTEGER; -- entity id
device_id VPX_HIST_STAT.DEVICE_ID%TYPE; -- device id
last_sample_time DATE; -- last sample time
sample_id BINARY_INTEGER; -- sample id
sample_time DATE; -- sample time
stat_value BINARY_INTEGER; -- stat value
stat stat_rec; -- stat record
sample_group sample_list; -- a group of samples
samples_to_drop sample_list; -- samples to be deleted
samples_to_keep sample_list; -- samples to be kept
t_sample_id BINARY_INTEGER; -- temp sample id
rollupOccurred BINARY_INTEGER; -- rollup indicator
matchFound BINARY_INTEGER; -- match indicator
/*
cursor used to select stats samples in a specified
time interval
*/
CURSOR samples(source_sample_int BINARY_INTEGER) IS
SELECT sample_id, sample_time, hs.stat_id, type, entity_id,
decode(device_id, NULL, ' ', device_id) device_id, stat_value
FROM vpx_hist_stat hs, vpx_stat_def sd, vpx_sample sa
WHERE sa.id = hs.sample_id
AND sa.sample_time BETWEEN
(last_sample_time - NUMTODSINTERVAL(target_interval_len, 'SECOND'))
AND
(last_sample_time - NUMTODSINTERVAL(source_interval_len, 'SECOND'))
AND sa.sample_interval = source_sample_int
AND hs.stat_id = sd.id
ORDER BY entity_id, stat_id, device_id, sample_time;
/*
cursor used to select all stats samples that is older than
a specified time interval
*/
CURSOR allSamples(source_sample_int BINARY_INTEGER) IS
SELECT sample_id, sample_time, hs.stat_id, type, entity_id,
decode(device_id, NULL, ' ', device_id) device_id, stat_value
FROM vpx_hist_stat hs, vpx_stat_def sd, vpx_sample sa
WHERE sa.id = hs.sample_id
AND sa.sample_time <=
(last_sample_time - NUMTODSINTERVAL(source_interval_len, 'SECOND'))
AND sa.sample_interval = source_sample_int
AND hs.stat_id = sd.id
ORDER BY entity_id, stat_id, device_id, sample_time;
/* sub-routine to rollup a sample group to one sample */
PROCEDURE rollup_sample_group(l_stat IN stat_rec,
l_sample_group IN sample_list,
l_drop_list IN OUT NOCOPY sample_list)
IS
l_sample_id BINARY_INTEGER := l_sample_group.FIRST;
/*
VPX_HIST_STAT.STAT_VAL has NUMBER(38) as data type; however,
our assumption is we should not have a valid stats value which
takes up all 38 precision; hence, it is sufficient to use
NUMBER(38) to hold the aggregated stat value
*/
l_stat_val NUMBER(38) := 0;
BEGIN
/* traverse the list of samples in sample group */
WHILE l_sample_id <= l_sample_group.LAST LOOP
IF l_sample_id != l_sample_group.LAST THEN
/* delete samples except for the last one in the group */
DELETE FROM VPX_HIST_STAT
WHERE stat_id = l_stat.stat_id
AND entity_id = l_stat.entity_id
AND decode(device_id, NULL, ' ', device_id) = l_stat.device_id
AND sample_id = l_sample_id;
/* add the sample to the drop list */
l_drop_list(l_sample_id) := 0; -- Stat value is not used.
END IF;
IF l_stat.stat_type = TYPE_DELTA OR
l_stat.stat_type = TYPE_AVERAGE
THEN
/* sum the stat values */
l_stat_val := l_stat_val + l_sample_group(l_sample_id);
END IF;
l_sample_id := l_sample_group.NEXT(l_sample_id);
END LOOP;
/* set sample id to last sample in the group */
l_sample_id := l_sample_group.LAST;
/* The stat value needs to be updated for delta or average type of stats */
IF l_stat.stat_type = TYPE_DELTA OR
l_stat.stat_type = TYPE_AVERAGE THEN
IF l_stat.stat_type = TYPE_AVERAGE THEN
l_stat_val := l_stat_val / l_sample_group.COUNT;
END IF;
/* update the last sample value */
UPDATE vpx_hist_stat SET stat_value = l_stat_val
WHERE stat_id = l_stat.stat_id
AND entity_id = l_stat.entity_id
AND decode(device_id, NULL, ' ', device_id) = l_stat.device_id
AND sample_id = l_sample_id;
END IF;
/* update the last sample interval */
UPDATE vpx_sample SET sample_interval = target_sample_int
WHERE id = l_sample_id;
COMMIT;
END rollup_sample_group;
BEGIN
/* get source interval */
SELECT sample_interval INTO source_sample_int FROM vpx_stat_config
WHERE length = source_interval_len;
/* get last sample time */
SELECT MAX(sample_time) INTO last_sample_time FROM vpx_sample;
/* get target interval */
SELECT sample_interval INTO target_sample_int FROM vpx_stat_config
WHERE length = target_interval_len;
/* initialize stat rec */
stat.stat_id := -1;
stat.entity_id := -1;
/* initialize the rollup indicator */
rollupOccurred := 0;
IF historical_included = 0
THEN
/* iterate through each stat sample by stat type and entity */
OPEN samples(source_sample_int);
ELSE
/* iterate through each stat sample by stat type and entity */
OPEN allSamples(source_sample_int);
END IF;
LOOP
IF historical_included = 0
THEN
FETCH samples INTO sample_id, sample_time, stat_id, stat_type,
entity_id, device_id, stat_value;
EXIT WHEN samples%NOTFOUND;
ELSE
FETCH allSamples INTO sample_id, sample_time, stat_id, stat_type,
entity_id, dev
"ODBC error: (HY000) - [ODBC][Ora]Trigger, procedure or function created with PL/SQL compilation error(s)." is returned when executing SQL statement "/* *************************************************************************
Copyright 2004 VMware, Inc. All rights reserved. -- VMware Confidential
*************************************************************************/
/*==================================================================
rollup_oracle.sql
vpx_stats_rollup procedure is called by vpxd to roll up stat
samples from one interval to another. This script processes the
stats da"
We had this problem too. Connecting VC202 to an oracle 10.2 DB. The following comments are from our DBA regarding the fix required (with virtualcentre being the user we created for the database):
"The problem is that the installation software requires execute access
to the dbms_lock package otherwise the creation of the
virtualcentre.cpx_stats_rollup procedure failed (dbms_lock is called
within this procedure and fails compilation).
This was tried on the TEST database.
AS sys,
grant execute on dbms_lock to virtualcentre;
This enabled the installation to proceed. The permission was then removed once install had completed.
As sys,
revoke execute on dbms_lock from virtualcentre;
and the general running on virtualcentre was still good."
This is in the Release Notes, I would not remove that privilege when you were done installing the upgrade.
http://www.vmware.com/support/vi3/doc/releasenotes_vc202.html#oracle
Oke you help us in the ride way and where now backing-up de VC. Whe test it and it works so where now planning to do it in the production.
Only defrence we still use Orcale 9
Thanks.