Installing SQL Profiler¶
PEM provides the SQL Profiler component to assist in both locating and optimizing poorly-running SQL code. Users of Microsoft SQL Server’s Profiler will find PEM’s SQL Profiler very similar in operation and capabilities. SQL Profiler is installed with each Advanced Server instance; if you are using PostgreSQL, you must download the SQL Profiler installer, and install the SQL Profiler product into each managed database instance you wish to profile.
For each database monitored by SQL Profiler, you must:
- Edit the postgresql.conf file; you must include the SQL Profiler library in the shared_preload_libraries configuration parameter.
- For Linux installations, the parameter value should include:
- on Windows, the parameter value should include:
- Create the functions used by SQL Profiler in your database. The SQL Profiler installation program places a SQL script (named sql-profiler.sql) in the share/postgresql/contrib subdirectory of the main PostgreSQL installation directory on Linux systems. On Windows systems, this script is located in the share subdirectory. You must invoke this script on the maintenance database (specified when registering the server with PEM).
- Stop and re-start the server for the changes to take effect.
Please note: if you have 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.