How to Connect to VCSA/VCVA postgres database

In order to troubleshoot the embedded vpostgres database in VCSA , below steps are used to connect to the database.

1. Connect to VCSA appliance using SSH.

Use the below commands.

vc:~ # cd /etc

vc:/etc # cd vmware-vpx
vc:/etc/vmware-vpx # ls
vc:/etc/vmware-vpx # less embedded_db.cfg

This will give the password within the quotes : only copy the text within the quotes

c:/etc/vmware-vpx # cd /opt/vmware/vpostgres

vc:/opt/vmware/vpostgres # ls
1.0 9.0 current
vc:/opt/vmware/vpostgres # cd 9.0/
vc:/opt/vmware/vpostgres/9.0 # cd bin
vc:/opt/vmware/vpostgres/9.0/bin # sudo -u postgres /opt/vmware/vpostgres/9.0/bin/psql -d VCDB postgres
Password for user postgres: <Type the same password as picked from embedded db.cfg file>
psql.bin (9.0.13)







Now you can execute the sql commands to fetch details from the postgres DB.

Happy Learning 🙂



Leave a Reply

Fill in your details below or click an icon to log in: Logo

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s