Unable to start Vcenter service due to DB Error “Suspect vCenter database on SQL Express”.


Error:

We unable to start Vcenter and their dependency service which throws an error in Event viewer Event-ID 7031 and 7024. Also we check the ODBC connectivity for the Vcenter DB where the test is not successful.

When we check the Vcenter DB in the SQL management studio it displays with yellow asterisk  and the error as VIM_VCDB(Suspect) as shown in the image below.

 

 

 

 

 

Root cause:

There can be many reasons for a SQL Server database to go in a suspect mode when you connect to it – such as the device going offline, unavailability of database files, improper shutdown etc..

Solution:

In order to have more information on why the database is Suspect, you just need to execute the following SQL command

Step -1: DBCC CHECKDB (‘YourDBname’) WITH NO_INFOMSGS, ALL_ERRORMSGS

In order to repair the database, we need to run some SQL command :

Step – 2: EXEC sp_resetstatus ‘VIM_VCDB’

Step -3: ALTER DATABASE VIM_VCDB SET EMERGENCY

Step -4: ALTER DATABASE VIM_VCDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE

The stored procedure sp_resetstatus turns off the suspect flag on a database. This procedure updates the mode and status columns of the named database in sys.databases

The EMERGENCY mode marks the database READ_ONLY, logging is disabled, and access is limited to members of the sysadmin fixed server role.

The SINGLE_USER specifies that only one user at a time can access the database (mandatory for repair with DBCC CheckDB)

Step -5: DBCC CheckDB ('VIM_VCDB', REPAIR_ALLOW_DATA_LOSS)

This command will try to repair errors. Theses repair could cause data loss.

Step -6: ALTER DATABASE VIM_VCDB SET MULTI_USER

We put database in production state. It has no longer the Suspect flag and can be accessed as usual.

 

 

 

 

 

 

Advertisements

One Response to Unable to start Vcenter service due to DB Error “Suspect vCenter database on SQL Express”.

  1. markwillium says:

    I have also written an article on this topic. You can check it out @
    http://sql-server-recovery.blogspot.in/2010/10/repair-restore-sql-server-database-from.html

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: