C:\ProgramData\VMware\VMware VirtualCenter\Logs\vpxd.log
file contains error messages similar to:[00336 error 'App'] [Vdb::LockRepositoryHelper] SQLExecDirect failed: HY000:6510:ODBC error: (HY000) - [Oracle][ODBC][Ora]ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at line 10
[00336 error 'App'] Unable to get exclusive access to VC repository. Please check if another VirtualCenter instance is running against the same database schema.
To avoid this problem, enable KeepAlive parameters on the Oracle server and on the vCenter Server machine.
Note: These parameters can also be used on a SQL server, to resolve locks with the database.
To enable the parameters on the Oracle server:
DWORD
parameters in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters:
KeepAliveTime = 60000
(where the value is in milliseconds, so it is equal to 60 seconds or one minute) KeepAliveInterval = 1000
(where the value is in milliseconds, so it is equal to 1 second) TcpMaxDataRetransmissions = 5
/etc/sysctl.conf
file: net.ipv4.tcp_keepalive_time=3000
(where the value is in seconds, so it is equal to 50 minutes) net.ipv4.tcp_retries2=5
net.ipv4.tcp_syn_retries=1
sysctl -p
. $ORACLE_HOME/network/admin/sqlnet.ora
file: SQLNET.EXPIRE_TIME = 1
To enable the parameters on the vCenter Server machine:
DWORD
keys in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
: KeepAliveTime = 60000
(where the value is in milliseconds, so it is equal to 60 seconds or one minute) KeepAliveInterval = 1000
(where the value is in milliseconds, so it is equal to 1 second) As an alternative workaround, create a shutdown script that stops the vCenter Server service when Windows shuts down. This automatically releases the database connection.
.cmd
). net stop /y vpxd
ping -n 61 127.0.0.1 > null
gpedit.msc
.