vCenter Server 6.0 is using by default the internal vPostgress Database. If you chose this option during the installation over an SQL server installation you basically lose the possibility to manage this DB, unless you install some vPostgress management tool. One of those tools is PgAdmin and in this post we will take a look on How-to Connect to vCenter 6 vPostgress Database with PgAdmin.
First thing to do is to go to the PgAdmin website and download the version you want. They have Linux, Windows or Mac OSX versions available for download. In this guide we’ll use the Windows version as I’m managing the lab vCenter from Windows box.
I used the default installation setup.
But then I run into an error on the system where I was installing the PgAdmin tool. The system was actually the vCenter server itself, which is Windows server 2012 R2 (x64). It seems that OOB the x64 systems throws and error on this, and I saw a thread where the user just took the 1.18 version instead.
That’s what I done too in order to continue…
Now we have a PgAdmin installed, but how to connect?
We have no error with 1.18 release of PgAdmin. Let’s move on…
Step 1: Edit a configuration file caled vcdb.properties located in this directory
It should look like this. Copy the password to the clipboard…
Step 2: Connect to the Database with PgAdmin
Note that you’ll have to first change another config file in order to accept TCP/IP requests from your management machine. (Source: PgAdmin.org Documentation) To do this just edit
pg_hba.conf file located at this directory:
You can add a line there in this format
host all all your_ip/24 md5
Note that you’ll need to restart the postgres Windows service to validate this config file….
Then go back to the PgAdmin UI and enter the user name (vc) and password you previously copied from the vcdb.properties file…. like this
And then hit the OK button to connect to the vCenter DB. You can expand the individual catalogs, schemas and tables or views the same way you would do it through SQL server management studio….
This is it. Now I’m not a fan doing some manual edits, but I usually like to have a GUI utility to be able to browse the DB tables, functions and stored procedures just in case. If there is a problem I usually tempt to restore from recent backup (if available) first. You might want to check another post I’ve done where you’ll see How to backup (and restore) vCenter database on Windows with a VMware script.
With that said, check also latest How-to, news and videos about vSphere 6 on a dedicated vSphere 6 page here.