Upgrading a SQL Profiler installation on a Windows host v8
If you're using SQL Profiler on a Windows host, Windows locks any files that executed or were loaded into memory. To release any locked files, you must stop the Postgres server before performing an upgrade.
On Windows, you can use the Services dialog box to control the service. To stop the service:
- In the Windows Control Panel, select System and Security > Administrative Tools.
- Double-click Services.
- In the Services dialog box, select the service name, and select Stop.
After stopping the Postgres Server:
Delete the existing SQL Profiler query set on each node by invoking the
uninstall-sql-profiler.sql
script. By default, on a Windows host the script resides in theshare\contrib
directory under your EDB Postgres Advanced Server or PostgreSQL installation.You can use the following server-specific commands.
For PostgreSQL:
Where
x
is the version of PostgreSQL and-d
specifies the name of the maintenance database.For EDB Postgres Advanced Server:
Where
x
is the version of EDB Postgres Advanced Server and-d
specifies the name of the maintenance database.Invoke the new SQL Profiler installer on each node you want to profile. Run the installer as an Administrator.
For PostgreSQL:
Where
x
is the version of the PostgreSQL andy
is the version of SQL Profiler, for example:sqlprofiler-pg-12-7.14.0-1-windows-x64.exe
.For EDB Postgres Advanced Server:
Where
x
is the version of EDB Postgres Advanced Server andy
is the version of SQL Profiler, for example:sqlprofiler-edb-as12-7.14.0-1-windows-x64.exe
.The SQL Profiler installer detects the existing SQL Profiler installation and upgrades it with the latest version of SQL Profiler.
Run the
sql-profiler.sql
script file in the maintenance database.For PostgreSQL:
Where
x
is the version of PostgreSQL and-d
specifies the name of the maintenance database.For EDB Postgres Advanced Server:
Where
x
is the version of EDB Postgres Advanced Server and-d
specifies the name of the maintenance database.Then, restart the Postgres server to resume profiling the node from a PEM client.