Connection to PostgreSQL (IDE)

You can easily connect to Alfresco database using database IDE, pgAdmin for example. But I prefer to use Intellij’s 0xdbe. All necessary information you can find in file (host, port, login and password).


Connection to PostgreSQL (SSH)

First you need to stop Alfresco and start PostgreSQL server:

/opt/alfresco-5.0.b/ stop
/opt/alfresco-5.0.b/postgresql/scripts/ start

After you can start interactive terminal by running:

psql -U alfresco
Password for user alfresco: 
psql (8.4.20, server 9.3.5)
WARNING: psql version 8.4, server version 9.3.
         Some psql features might not work.
Type "help" for help.


Password could be found in file.

Now you are able to select from alfresco tables:

alfresco=> select * from alf_audit_app;
 id | version | app_name_id | audit_model_id | disabled_paths_id 
  1 |       0 |           5 |              2 |                 2
(1 row)

Connection to H2 (for IntelliJ IDEA)

For IDEA it’s quite easy to connect to H2 database. Search for alf-dev.h2 file and just drag-and-drop to database tab:


And you can open the console (Ctrl+Shift+F10 or right click on the database and select Console)