Login failed for user''Failed to open the explicitly specified database" while upgrading vCenter Server 5.x to 6.0 fails at the data export phase with embedded Microsoft SQL Server Express database
search cancel

Login failed for user''Failed to open the explicitly specified database" while upgrading vCenter Server 5.x to 6.0 fails at the data export phase with embedded Microsoft SQL Server Express database

book

Article ID: 320171

calendar_today

Updated On: 07-26-2019

Products

VMware vCenter Server

Issue/Introduction

  • When upgrading vCenter Server for Windows 5.x with an embedded Microsoft SQL Server Express database, the upgrade might fail while the installer is exporting vCenter Server data from the source database. You might see an error message similar to the following in the vcdb_export.err log file:
 
Msg 4060, Level 11, State 1, Server VCSITE2\VIM SQLEXP, Line 1
Cannot open database "VIM VCDB" requested by the login. The login failed.
Msg 18456, Level 14, State 1, Server VCSITE2\VIM_SQLEXP, Line 1
Login failed for user '\VMWARE\Admin'.
 
  • You might find error messages similar to the following in the Windows Application or Microsoft SQL Server Express error log file:
 
2015-01-13 18:08:02.73 spid51 Starting up database 'VIM_VCDB'.
2015-01-13 18:08:15.83 Logon Error: 18456, Severity: 14, State: 38.
2015-01-13 18:08:15.83 Logon Login failed for user 'VMWARE\vmadmin'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]
2015-01-13 18:08:16.38 spid51 Starting up database 'VIM_VCDB'.
 
  • The login failure error is caused by:
    • Poor hardware utilization during the upgrade
    • Microsoft SQL Server Express is deployed with AUTO_CLOSE = ON by default
  • Hardware utilization is not easily resolved. Consider disabling the AUTO_CLOSE option for the vCenter Server embedded MS SQL Server Express database during upgrade.


Environment

VMware vCenter Server 5.5.x
VMware vCenter Server 6.0.x

Resolution

Before you attempt the upgrade again, perform the following steps to disable the Microsoft SQL Server Express AUTO_CLOSE option.
  1. On the Windows system where vCenter Server 5.x is installed, open a command prompt: Run > cmd.
  2. Verify Microsoft SQL Server Express is running: #sc query MSSQL$VIM_SQLEXP
SERVICE_NAME: MSSQL$VIM_SQLEXP
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
  1. Disable AUTO_CLOSE for the VIM_VCDB: #sqlcmd -E -S localhost\VIM_SQLEXP -Q "ALTER DATABASE VIM_VCDB SET AUTO_CLOSE OFF WITH NO_WAIT"