Posted: 3 Mar 2015 20:44 EST Last activity: 16 Aug 2017 22:35 EDT
Pega 7.1.7 PVS database connection details
I tried to connect to the PRPC database of Pega 7.1.7 PVS used in the CLSA 7.1 course, using dbVisualizer; I wanted to run some queries and to view some of the tables. I could not find the database user name/password and connection details.
Please kindly give the db connection details for the Pega 7.1.7 pvs and personal editions.
When XMing launches using XLaunch.exe you will see an “X” icon within your Windows system tray.
There are a number of web sites that describe how to use XMing and putty in conjunction. The most import configuration for your putty configuration is to enable X11 forwarding. Specify “:0.0” as the X display location.
Log in using putty, then enter: pgadmin3
Click the plug icon in the upper right-hand corner. Enter “prpc” as the user name and “password” as the password.
Virtually anything you can do with a Windows-installed database client can be done through the pgadmin3 UI without having to modify the database security settings.
For some reason my post for how to connect using Squirrel did not "take".
That post mentioined that I cannot paste images into this forum -- you have to imagine them below.
Here is the text version again:
8>< - - - - Squirrel - - - - - ><8
Database connection information can be found in Tomcat’s conf directory’s context.xml file.
<!-- PostgreSQL 9.1 -->
Note above that Tomcat is told that the Postgres database is one the same server, i.e., localhost. To you this is “prpc” as defined in your C:\Windows\System32\drivers\etc\hosts file. Example below.
192.168.222.134 prpc # 7.1.7
192.168.222.129 prpc62 # 6.2 PVS
The information needs to connect to any database using a JDBC thin driver is:
• Driver class: org.postgresql.Driver
• JDBC URL: jdbc:postgresql://prpc:5432/pega
• User: prpc
• Pass: password
Next you need to locate a jar that contains the Postgres Driver class. Go to https://jdbc.postgresql.org/. Since version 9 of Postgres is used, click on the “JDBC4” link. Example file name downloaded = postgresql-9.4-1201.jdbc4.jar. Place this jar in a well-known location, e.g., C:\717.
Next download the Squirrel Open Source Java application from http://www.squirrelsql.org/. Extract to a directory such as C:\apps\Squirrel.
Be sure you have Java installed on your laptop and have JAVA_HOME defined.
Launch Squirrel, click on Drivers, click on Extra Class Path, navigate to the Postgres Driver jar than you downloaded, click Open, then click OK.
Next click on the Aliases tab, add supply the information below to connect to the 7.1.7 PVS. As shown above, the password is simply “password”.
If you click “Connect” now, however, you will get an error. The reason for this is that Postgres by default does not allow remote connections.
Using putty, log into your PVS, then issue: cd /etc/postgresql/9.1/main
Launch vi using: sudo vi postgresql.conf
As shown below, add: listen_addresses = '*'
Next execute: sudo vi pg_hba.conf
As shown below, add: host all all 0.0.0.0/0 trust
Finally, restart the Postgres DB.
sudo /etc/init.d/postgresql stop
sudo /etc/init.d/postgresql start
Try your Squirrel connection again. This time it should work.
After performing the above steps in case of PEGA 7 Personal Edition, an issue is occurring while connecting to PGSQL from Squirrel using the connection parameters.
The following exception is getting logged in the Squirrel log file:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.postgresql.util.PSQLException: The connection attempt failed.
Is something else that needs to be done while setting up the database client for Personal Edition?
1. Ensure the database listens for connections from the outside world. That is done in the file postgresql.conf. Add listen_addresses = '*' to the end of this file if this text does not exist in the file.
You might need to search for that file in Linux (find / -mount -name postgresql.conf)
2. Ensure postgres allows logins from external computers. This is done in the file pg_hba.conf. Add "host all all 0.0.0.0/0 trust" to the end of the file and replace all occurence of "peer" with "md5" in the same file. You might need to search for that file in Linux (find / -mount -name ph_hba.conf)
3. Ensure SQuirreL can find the postgres jdbc driver. My postgres jdbc driver file is postgresql-9.2-1002.jdbc4.jar, but can be another version depending on what you did download. This is done onder the Drivers tab in Squirrel --> Extra Class Path.
PostGresql must now be restarted. Can be done in many ways, but a reboot of the virtual machine might be the easiest.
4. Make a connection configuration in SQuirreL to your database.
Enter jdbc:postgresql://<your hostname or IP>:5432/<your database name>
In my system this is jdbc:postgresql://prpc.:5432/pega but yours is probably different.
This is quite the same as Lee written above. If you still have problems you can reach out to me and I can try to help you remotely. (email@example.com)
Just connected myself for the first time to the 7.1.7 VirtualBox 's postgres DB.
I used pgAdmin3.exe from my laptop's Personal Edition. host = prpc, user = prpc, password = password.
You can run the script below after which I recommend doing "Machine -> Reset" to 100% guarantee the database is restarted.
Use WinSCP.exe to copy the script to the PVS, naming it "pgEnable,sh", then make it executable using: chmod +x pgEnable,sh
After that execute the script using "sudo", for example, sudo ./pgEnable.sh
echo Fix RDBMS settings in your virtual machine
pg=`find / -mount -name postgresql.conf 2> /dev/null`
if [ -n "$pg" ]
echo Changing listening address for postgresql
grep "^listen_addresses = '\*'" $pg > /dev/null 2>&1 || echo "listen_addresses = '*'" >> $pg
echo Postgres.conf file not found
pg=`find / -mount -name pg_hba.conf 2> /dev/null`
if [ -n "$pg" ]
echo Changing host allowance for postgresql
grep "^host.*0\.0\.0\.0/0" $pg > /dev/null 2>&1 || echo "host all all 0.0.0.0/0 trust" >> $pg
echo applying md5 to peer authentication
sed -i "/^local.*all.*all.*peer$/s/peer/md5/g" $pg
echo postgres restart in 5 minutes. We wait 5 min so we not interfere with prpc startup.
echo service postgresql restart \> restart.res 2\>\&1 | at now + 5 min
echo Postgres pg_hba.conf file not found
When I am trying to restart using /etc/init.d/posstgresql-9.3 restart , it is givign [OK] for stopping, but it is failing to restart. Could you please let me know why the postgres is failing to restart. The PVS is 7.1.9 and OS is windows 10
When I veirified the logs under pg_logs it seems it is not accepting the ipaddress, so, gave the format in subnet mask format like 192.xx.yy.0/13 and it took it and restarted the database server. I got this issue in windows side, but in mac it just accepted without subnet mask format....like 192.xx.yy.13.
I see all these discussions, queries, solutions on top of solutions, etc., are in forum and thats too happenining since early 2015. It would be great if Pega Academy put some formal documentation around PVS to Postgres database connectivity.