Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

Query VMWare vCenter VCDB database for guest and host details

24 January,2015 by Tom Collins

If you’re  managing SQL Servers hosted on VMWare  ESX hosts , getting  host and guest details from the VMWare VCDB database is useful.  Normally a DBA will request the information from a VM administrator or access the vCenter GUI interface.   Information displayed on vCenter  is stored in a SQL Server database called VCDB.

 The VCDB database stores details about the underlying virtualization details. In a previous post  Virtualization – and database servers I’ve discussed the need to  review memory, storage and CPU details of the virtual infrastructure.

It is possible to query the VCDB database directly and get the information required from the underlying tables and views.

I’ve queried the VCDB database for different purposes . Some examples:

a)performance troubleshooting

b)SQL Server Inventory management

c)configuration details

 

Query to get guest and host details from VMWare vCenter VCDB database

This query returns all guests with SQL in the name across all ESX clusters

 

SELECT 
VMS.name AS [Server Name], VCR.name AS [Cluster Name], HOS.name as [Host Name], 
VMS.DNS_name, VMS.IP_ADDRESS, HOS.hostid, *
 FROM vpxv_vms VMS 
 INNER JOIN VPXV_HOSTS HOS on VMS.hostid = HOS.hostid
 INNER JOIN VPXV_COMPUTE_RESOURCE VCR on HOS.farmid = VCR.RESOURCEPOOLID
   WHERE VMS.name like '%SQL%' 
 ORDER BY VCR.name, VMS.name


Read More on Virtualization

How to find VMWare ESX Host event messages using VPXV_EVENTS

SQL Server – virtualization - is it a viable alternative

Database Virtual Server Candidacy Criteria


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Query VMWare vCenter VCDB database for guest and host details


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer