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
C:ProgramDataVMwarevCenterServercfgvmware-vpxvcdb.properties
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:
C:ProgramDataVMwarevCenterServerdatavpostgrespg_hba.conf
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.
Dejan says
Hi Vladan
I am using vCenter applianace almost from the first release. OK, there were some bugs (database has used all space) but after I opened case, they efficently release new patch to address this situations.
If you stick to “normal” operations, with normal number of hosts, no FT etc, I do not see why would I use classical vCenter.
I am asking, what is your experience with vCenter appliance and why do you hold on to classical vCenter if we exclude the fact, that it is OK to stay in touch with new technology.
Regards, Dejan
Vladan SEGET says
While in some cases the client do not mind having a vCenter as VCSA, in majority cases they (still) prefer Windows. They are use to have GUI, and additionally they can also install other stuff (even If I don’t recommend that).
As for myself, in my lab I have both.
regards,
Vladan
Rafael Ferreira Sousa says
I am a great admirer of your work.
But recently, seeking in his articles ask you a question? It is possible to migrate the vCenter database that is in Postgres to SQL Server?
When former manager set up our vCenter he made the installation in embedded mode.
Today acquired SQL Server 2012, after the bank always corrupt when the host had to be restarted.
stephen says
I read this article because I have recently removed a Operations Manager with out un registering now its permanent stuck in my web client under related objects, and when I install a new one 2 show there even though the 1st one is a dead link. I was hoping I could find this dead link in the database to remove. All other tutorials only specify how to remove broken extensions but in this case there is no extension. How do you clean this out of the web client?
Wojciech Marusiak says
Very useful article Vladan.