vCenter 6.5 we are using postgress database as internal database for vCenter.All the information related to vCenter are store in this database.
How to access data in this database
1.Login to the vCenter appliance using putty
Just type shell to enable shell commands
2.Using below command we can connect to vpostgress database
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
3.Using \l+ we can get the details of running databases
4.To get help we need to run \?
4.Using \c command we can get the tables inside the database. For this example im using VCDB database
Command syntax
\c DATABASENAME
EX
\c VCDB
5.To list the tables of database we can use \dt
6.To view schema of the table
\d+ vpx_vm
7.To query only vm names from vpx_vm table
8.Same way we can get more details as we like