VMware latest releases ship with the vPostgres database as their embedded database. If you are planning to migrate your current VMware environment you will get this as an option. If you are not sure with the next upgrade and the recommendation try vSphere Topology and upgrade planning tool. You can read my previous article from here.
So then you will have to work with this VMware embedded database and you need to use these commands. I believe this article will help you to interact with this embedded database. First of all you need to open a ssh session and connect to the shell
View the VCSA 6.5 embedded database configuration information
command to view the configuration
You can see the details such as database type, database server, database port, database instance, database user, etc
To connect to the vCenter database :
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
you can see the release version after that
SELECT * FROM VPX_VERSION;
to check the VCSA Product Version
to view the defined user roles in the database server, in the below output we have four users created. “postgres” is a super user.
To view all (describe all) the tables use :
To describe a specific table use:
To turn on\off Expanded display use (see the described table command below as an expanded command) :
To view the list of available functions use:
To display the overall size of the vPostgres database in MB execute the below query:
To display the Table size of the VPX_EVENT in KB use:
To list all the databases use:
I hope you might need to get a good understanding about these commands when you are working with vCenter vPostgres embedded database and my post will help you to get familiar with the vPostgres database.
A word of advice…
Appreciate your input. Not gonna touch in production unless we have a special reason, also without VMware premium support advice
— Aruna Lakmal (@techcrumble_net) November 16, 2017