Installing the SQL Profiler plugin v8
You must install the plugin on each server on which you want to use SQL Profiler. For example, if you have a host running PostgreSQL 10 and PostgreSQL 11, you must install two versions of the plugin, one for each server.
Install the plugin for PostgreSQL before configuring it. If you're using EDB Postgres Advanced Server, you can skip installation and go to Configuring SQL Profiler.
You can use the graphical installer to install any version of SQL Profiler on the Windows platform. On Linux, use an RPM package to install the SQL Profiler. For detailed information about configuring the EDB repository for your host platform, see the Installing on the PEM server .
Installing SQL Profiler on Windows
To invoke the SQL Profiler graphical installer, assume Administrator privileges, navigate to the directory that contains the installer, and double-click the installer icon. The SQL Profiler installer welcomes you to the Setup Wizard.
Select Next to continue to the license agreement.
Review the license agreement before selecting the appropriate radio button and accepting the agreement. Select Next.
Specify an alternative location for the installation directory, or accept the default location and select Next.
The wizard is now ready to install the SQL Profiler plugin. Select Next.
When the installation is complete, the SQL Profiler plugin is ready to configure.
Installing SQL Profiler on RHEL
Note
You might need to add the sslutils
package to your PostgreSQL database servers before installing SQL Profiler.
If you already configured the EDB repository on your system, you can use dnf
to install SQL Profiler.
For PostgreSQL,
Where <X>
is the version of your Postgres server.
For EDB Postgres Advanced Server,
Where <X>
is the version of your EDB Postgres Advanced Server installation.
For detailed information about configuring the EDB repository, see Installing the PEM server.
Installing SQL Profiler on Debian/Ubuntu
Note
You might need to add the sslutils
package to your PostgreSQL database servers before installing SQL Profiler.
You can use an apt
command to install SQL Profiler using DEB on Debian and Ubuntu. Assume root privileges.
For PostgreSQL,
Where <X>
is the version of your Postgres installation.
For EDB Postgres Advanced Server,
Where <X>
is the version of your EDB Postgres Advanced Server installation.
When the installation is complete, the SQL Profiler plugin is ready to configure.
Installing SQL Profiler on SLES
Note
You might need to add the sslutils
package to your PostgreSQL database servers before installing SQL Profiler.
You can use an zypper
command to install SQL Profiler on SLES. Assume root privileges.
For PostgreSQL,
Where <X>
is the version of your Postgres server.
For EDB Postgres Advanced Server,
Where <X>
is the version of your EDB Postgres Advanced Server installation.
When the installation is complete, the SQL Profiler plugin is ready to configure.
Configuring SQL Profiler
The SQL Profiler plugin isn't enabled when the installation process completes. This way you can restart the server at a convenient time. It also prevents the plugin from being loaded on systems where you don't need it all the time.
Note
If you connected to the PEM server with the PEM client before configuring SQL Profiler, you must disconnect and reconnect with the server to enable SQL Profiler functionality.
To enable the plugin:
Edit the
postgresql.conf
file on the server you want to profile, modifying theshared_preload_libraries
parameter:Restart the Postgres server.
Using the Query tool or the psql command line interface, run the
sql-profiler.sql
script in the maintenance database on the server you want to profile. If you are using:- PostgreSQL, the default maintenance database is
postgres
. - EDB Postgres Advanced Server, the default maintenance database is
edb
.
To use the PEM Query tool to run the script:
- Select the maintenance database in the Browser tree and select Tools > Query tool.
- When the Query tool opens, select File > Open and select the
sql-profiler.sql
script. By default, thesql-profiler.sql
script is located in thecontrib
folder under your Postgres installation. - When the script opens in the SQL Editor panel of the Query tool, select the content of the script in the SQL Editor and select Query > Execute to invoke the script and configure SQL Profiler.
You can also use the psql command line to invoke the configuration script. The following command uses psql to invoke the
sql-profiler.sql
script on an EDB Postgres Advanced Server database on a Linux system:Where
<x>
is the version of the EDB Postgres Advanced Server.- PostgreSQL, the default maintenance database is
After configuring SQL Profiler, it's ready to use with all databases that reside on the server.
To access SQL Profiler functionality, select the monitored Server/database in the PEM Browser tree. Select Tools > Server > SQL Profiler. Then select:
- Create trace to define a new trace.
- Open trace to open an existing trace.
- Delete trace(s) to delete one or more traces.
- View scheduled trace(s) to review a list of scheduled traces.