ODBC and DSN errors installing vCenter Server
search cancel

ODBC and DSN errors installing vCenter Server

book

Article ID: 333533

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

During the initial installation of vCenter Server, if you are using a dedicated database server, you should create an ODBC Data Source that vCenter Server uses to connect to the database. If there are changes made to the physical environment, vCenter Server may fail and not start until the information in the Data Source is corrected.

This article provides steps to:
  • Check which Data Source vCenter Server is using
  • View and modify the Data Source used for vCenter Server (for both Microsoft SQL and Oracle)
  • Modify the username and password vCenter Server uses to connect to the database server


Symptoms:
  • Installing vCenter Server fails
  • You see the error:

    Re-configure your DSN to use one of the supported drivers
     
  • The VirtualCenter Server service does not start.
  • In the C:\ProgramData\VMware\VMware VirtualCenter\Logs\vpxd.log file, you see entries similar to:

    ODBC error: (IM014) - [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application.
     
  • In the C:\ProgramData\VMware\VMware VirtualCenter\Logs\vpxd.log file, you see entries similar to:
     
    • In Oracle:

      ODBC error: (HY000) - [Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied

      or:

      ODBC error: (HY000) - [Oracle][ODBC][Ora]ORA-12541: TNS:no listener
       
    • In SQL:

      ODBC error: (08001) - [Microsoft][ODBC SQL Server Driver][DBMSLPCN]SQL Server does not exist or access denied


Environment

VMware vCenter Server 5.5.x
VMware vCenter Server 6.0.x
VMware vCenter Server 6.5.x
VMware vCenter Server 7.0.x
VMware vCenter Server 4.0.x
VMware vCenter Server 5.0.x
VMware vCenter Server 6.7.x
VMware vCenter Server 4.1.x
VMware vCenter Server 5.1.x

Resolution

Note: Some of the procedures in this article involve modifying the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft Knowledge Base article 136393 .

Note: The preceding link was correct as of September 16, 2019. If you find the link is broken, provide feedback and a VMware employee will update the link.

Select the following troubleshooting steps are available as listed below:

Checking which Data Source is being used by vCenter Server

 
vCenter Server 5.5:
 
To check which Data Source is currently being used:
  1. Log in to the vCenter Server as an administrator.
  2. Click Start > Run, type regedit, and press Enter. The Registry Editor window opens.
  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VirtualCenter\DB.
  4. The name of the Data Source that is currently being used is in the 1 registry key. Make a note of this name for use in subsequent steps of this article.
  5. Click File > Exit without making any changes.
vCenter Server 6.0:
 
To check which Data Source is currently being used:
  1. Log in to the vCenter Server as an administrator.
  2. Navigate to C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx.
  3. Open vpxd.cfg within a text editor.
  4. Search for <dsn> and make a note of the Data Source name.
        <odbc>
          <dbtype>embedded</dbtype>
          <dsn>VMware VirtualCenter</dsn>
        </odbc>

     
  5. Open the tnsnames.ora file using a text editor.
Note: This file is generally located at C:\Oracle\Oraxx\NETWORK\ADMIN (where xx is either 9I or 10g). Look for an entry similar to the example below, where SERVICE_NAME is the TNS Service name to be changed in step 7:

VPX =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=TCP)(HOST=server)(PORT=1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ServerTableSpace)
)
)
HOST =


In this example, HOST=server is the database host to which the client needs to connect, and SERVICE_NAME = ServerTableSpace is the TNS Service name that is being used from the Oracle server.
  1. To change the host that is being connected to, modify server, to the name of the new server that the Data Source connects to.
  2. To change the tablespace that is being used, modify ServerTableSpace to the name of the tablespace being used on the Oracle server.
  3. When this is complete, save and close the file.

To confirm that the changes are successful:

  1. Navigate to Start > Control Panel > Administrative Tools > Data Sources (ODBC).

    For vCenter Server 4.0 running on a 64-bit host:

    Click Start > Run, type %systemdrive%\Windows\SysWoW64\Odbcad32.exe, and press Enter.
     
  2. Click the System DSN tab.
  3. Select the Data Source that vCenter Server is using.
  4. Click Configure.
  5. Click Test Connection.
  6. Enter the username and password, and click OK.
  7. Review the message that is presented. If the change was successful, click OK and exit out of the driver configuration wizard. If the test fails, review and correct the changes to the configuration and try the test again.
 

Modifying the username and password vCenter Server uses to connect to the database server (valid only for vCenter Server 2.5.x and below)

A common misconception is that the username and password used for vCenter Server is stored within the Data Source. The username and password for vCenter Server are stored in the registry. Instructions on resetting the password from the installer and resetting the password manually are described below.

Note: Ensure that you are using SQL authentication if you are using a Microsoft SQL server because Windows NT authentication is not supported.

To reset the username and password from the Installer:
  1. Log in to the vCenter Server as an administrator.
  2. Click Start > Control Panel > Add or Remove Programs.
  3. Click VMware VirtualCenter Server or VMware vCenter Server from the list of currently installed programs.
  4. Click Change.
  5. Click Next.
  6. Select Repair.
  7. Click Next.
  8. Ensure that Use an existing database server is highlighted.

    Note: If you are using an MSDE or SQL Express installation of vCenter Server, it is set up to use Windows Authentication by default and uses the account the service is set to start with. VMware does not recommended changing this configuration.
     
  9. Click Next.
  10. Enter the new username and password. Ensure that the Data Source name is correct, then enter the new username and password.
  11. Click Next.
  12. Click No when you are prompted with this message:

    The DSN points to an existing VMware VirtualCenter repository. Do you want to reinitialize the database and start over with a blank configuration?

    Warning: If you click Yes, your existing configuration is overwritten with a blank new one.
     
  13. Click Next through the remainder of the installation, leaving the default options selected.
  14. On the Ready to Repair the program screen, click Install.
  15. When the repair is complete, exit the installer by clicking Finish.
 

To reset the username and password manually, without running the installer (valid for all versions of vCenter Server)

vCenter Server 5.5 and earlier:
  1. Log in to the vCenter Server as an administrator.
  2. Click Start > Run, type regedit, and click OK. The Registry Editor window opens.
  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VirtualCenter\DB.
  4. The user that is configured for database connectivity is in the 2 registry key.
  5. Right-click on the 2 key, and click Modify.
  6. Change the Value data to the name of the new user account.
  7. Click OK.
  8. Click File > Exit without making any changes.
vCenter Server 6.0:
  1. Stop the vCenter Server service. For more information, see Stopping, starting, or restarting VMware vCenter Server 6.0 services (2109881).
  2. Navigate to C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx.
  3. Take a backup copy of vpxd.cfg file.
  4. Open vpxd.cfg file in a text editor.
  5. Locate the <DB> element and modify the value for <key_2> to reflect the new database user ID.

    ...
    <DB>
    C:\Program Files\VMware\Infrastructure\vCenter Server\vpxd\

     
  • Run the command:

    vpxd.exe -p
     
  • When prompted, enter the new password and press Enter.
  • Retype the password and press Enter again to complete the password change.
Note: If your issue still persists, contact VMware Support. For more information, see How to Submit a Support Request.


Additional Information

Alternatively, if you can log into the vCenter Server using the VI Client (or vSphere Client), reset the password there:

Updating the VirtualCenter 2.5 database user password:

Note: These steps apply to VirtualCenter 2.5 only:
  1. Log in to the vCenter Server as an administrator from the vSphere Client.
  2. Click Administration > vCenter Management Server Configuration > Database.
  3. Enter the new password in the Database Password fields.
  4. Click OK.

    Note: You must manually restart the VMware VirtualCenter Server service when this change is made, or reboot the host. This method only allows for you to change the database password. If you need to change the username follow the steps in the article above.

Updating the vCenter Server 4.x database user password:

To update the database user password stored in vCenter Server 4.x using the vSphere Client, see Updating the database user password stored in vCenter Server (2000493).

For translated versions of this article, see: Changing the vCenter Server database user ID and password
Upgrading vCenter Server fails with the error: DSN is pointing to an unsupported ODBC driver or unsupported database driver
Updating the database user password stored in vCenter Server
La instalación de vCenter Server falla con errores de ODBC y DSN
Falha na instalação do vCenter Server com erros de ODBC e DSN
vCenter Server 安装失败并出现 ODBC 和 DSN 错误
ODBC および DSN エラーが発生し、vCenter Server インストールに失敗する
How to stop, start, or restart vCenter Server 6.x services
Installation von vCenter Server schlägt mit ODBC- und DSN-Fehlern fehl