Example of Connecting to Pega 7 PRPC PostgreSQL DB with pgAdmin

This post shows how the PRPC database –assuming PRPC is configured to use PostgreSQL– and its tables can be accessed using the pgAdmin tool. This example applies to the following PRPC installation method:

  1. PegaRULES Process Commander is installed as a Personal Virtual Server (PVS) utilizing the VMWare Player as described in the Downloading the Exercise System section of the System Architect Essentials I (7.1) and Senior System Architect (7.1) courses provided by Pega Academy.
  2. For this example, Windows 7 is used as the host operating system. The steps should be similar for other OS.

Related Posts


  1. Installation of the PostgreSQL pgAdmin Console
  2. Configuration of PostgreSQL DB Server to Accept Remote Connections
  3. Configuration of Connection Settings in postgresql.conf File
  4. Setup of PostgreSQL DB User for pgAdmin Connections
  5. Configuring the Connection to the Pega 7 DB in pgAdmin

Download the pgAdmin tool for Windows from https://www.pgadmin.org/download/windows.php or for the Mac from https://www.pgadmin.org/download/macosx.php. In this example, pgAdmin version 1.14.3 for Windows was used. Follow the pgAdmin installation instructions to install the application.

  • The exercise systems on Pega Academy use the PostgreSQL DB server as part of the PRPC personal virtual server installation.
  • Open the VMWare Player and click on the virtual machine and then click on the link Edit virtual machine settings.

VMWare Player Edit Virtual Machine Settings

  • Clicking on Network Adapter opens a view showing the current network connection settings.
  • In this example, the Network Adapter under Virtual Machine Settings of the VMWare Player is configured to use NAT (network address translation), so that the host’s IP address is shared (in this case the Windows OS on which the VMWare Player is running).
  • This will result in the virtual machine using an IP address in the 192.168 private network that is shared with the host operating system.

VMWare Player Edit Virtual Machine Settings - Network Adapter NAT Used to share the hosts IP Address

  • Next, use the VMWare Player to start the virtual machine by clicking on the link Play virtual machine and access it through the command line using the default user architect and the default password password.
  • For newer versions of the Pega Exercise System, use the default user root and the password install.

VMWare Player Ubuntu Command Line Login to Virtual Machine

  • The PostgreSQL server instance needs to be configured so that it allows connections from the 192.168 private network since pgAdmin has been installed on the host operating system.
  • Navigate to the folder /etc/postgresql/9.1/main on the virtual machine and locate the file pg_hba.conf.
  • Open the file in the vi editor using the command sudo vi pg_hba.conf

VMWare Player Ubuntu Command Line - Edit pg_hba.conf

  • In the section # IPv4 local connections, add: host all all md5 to allow incoming connections from pgAdmin running on the Windows host operating system.

VMWare Player Ubuntu Command Line - Edit pg_hba.conf with VI

  • Navigate to the folder /etc/postgresql/9.1/main and locate the file postgresql.conf and open it in vi using the command:
sudo vi postgresql.conf
  • Locate the section # CONNECTIONS AND AUTHENTICATION and uncomment the parameter listen_addresses and set its value to '*'.

VMWare Player Ubuntu Command Line - Edit postgresql.conf

  • In order for the changes to take effect, the virtual machine can either be restarted or the command:
/etc/init.d/postgresql restart
  • …can be used to only restart PostgreSQL so that it applies the updated configuration files.

VMWare Player Ubuntu Command Line - Restart PostgreSql DB Server

  • The PostgreSQL DB server running on the virtual machine will now accept remote connections from any IP address.

  • It is recommended to create a dedicated PostgreSQL database user that will be used in the pgAdmin console. Execute the following command to create a new super user with access to all databases:
sudo -u postgres createuser --superuser <username>
  • Then open the PostgreSQL command line with by executing the command:
sudo -u postgres psql
  • Set the password of the new super user with the psql command:
\password <username>

VMWare Player Ubuntu Command Line - Create New PostgreSql DB User

  • The PostgreSQL server port should be 5432. It can be checked by executing the command:
sudo -u postgres psql -c "SHOW port;"

VMWare Player Ubuntu Command Line - Get PostgreSql DB Server Port 5432

  • Obtain the IP address of the virtual server by executing the command:
ifconfig -a

VMWare Player Ubuntu Command Line - Get Virtual Machine IP Address ifconfig command

  • In this case, the IP address of the virtual machine is
  • Open the pgAdmin application on the Windows host system.

  • In pgAdmin, click on File in the top level menu and select Add Server.
  • In the New Server Registration dialog, enter the name for the connection, the host name, the port and the username and the password of the super user account created earlier.
  • Then click on Ok to open the connection.

pgAdmin Console - Add New Server - Properties

  • Double clicking on the new server connection opens a tree menu showing the Pega PRPC database named pega.
  • pgAdmin can be used to understand how PRPC operates and how it maintains data and rules by looking at the tables in the associated schemas.

pgAdmin Console - Accessing pegarules schema of pega database

Caution: Modifying or deleting data or PRPC system tables can compromise a PRPC instance and render it useless.

One thought on “Example of Connecting to Pega 7 PRPC PostgreSQL DB with pgAdmin

Leave a Reply