The environment is running VMware 6.0 U3 on both hosts and vCenter. We have verified ODBC and vcdb.properties are pointed to the correct database server and there is no issue with database connectivity.
We see this error in the event log:
The VMware Inventory Service service terminated with the following service-specific error:
Incorrect function.
We also see the following Java errors in the VMware inventory service log,:
Caused by: com.vmware.vim.query.server.kvlocal.impl.exception.KVExecutionException: SQL Error:
at com.vmware.vim.query.server.kvlocal.impl.KVUtil.createAndLogExecutionException(KVUtil.java:153)
at com.vmware.vim.query.server.kvlocal.impl.provider.VCDBProviderFactory.getConnection(VCDBProviderFactory.java:116)
at com.vmware.vim.query.server.kvlocal.impl.provider.VCDBProviderFactory.getExistingProviders(VCDBProviderFactory.java:327)
at com.vmware.vim.query.server.kvlocal.impl.KVManagerImpl.populateExistingProviders(KVManagerImpl.java:806)
at com.vmware.vim.query.server.kvlocal.impl.VCDBKVManagerImpl.init(VCDBKVManagerImpl.java:72)
... 91 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL ''
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1452)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.vmware.vim.query.server.kvlocal.impl.provider.VCDBProviderFactory.getConnection(VCDBProviderFactory.java:114)
... 94 more
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:278)
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1437)
... 97 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' for connect URL ''
Caused by: java.sql.SQLException: No suitable driver
Check if you have correct driver on ODBC connection. It should be SQL Native Client.
Yes, we checked system DSN 64 bit to make sure it is configured correctly (see below). We even went as far as reinstalling SQL native client to the latest version.
Microsoft SQL Server Native Client Version 11.00.7001
Running connectivity tests...
Attempting connection
Connection established
Verifying option settings
Disconnecting from server
TESTS COMPLETED SUCCESSFULLY!
SQL is on the same server as vCenter?
Do you use default TCP port on SQL (1433) or Dynamic port?
Check one more thing: which Data Source is currently being used:
- Navigate to C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx.
- Open vpxd.cfg within a text editor.
- Search for <dsn> and make a note of the Data Source name.
SQL is remote to the vCenter server. I ran netstat on the SQL server and it shows that SQL is listening on port 1433
I checked vpxd.cfg and it is pointed to the correct data source.
<odbc>
<dbtype>external</dbtype>
<dsn>PCI_VCDB</dsn>
</odbc>
32-bit DSN is not necessary for vCenter (it is probably for Update Manager). But both have the same name......can you change name of 32bit DSN? Maybe it will help
And check on 64bit DSN if you have correct DB configured (vCEnter DB instead of master DB)