Upgrading and Uninstalling PEM Components

For detailed information about upgrading and moving PEM components, please see the PEM Upgrade and Migration Guide. PEM documentation and links to PEM and SQL Profiler installers are available from the EnterpriseDB website

Upgrading Postgres Enterprise Manager on Windows™

To upgrade your version of PEM on Windows, simply invoke the PEM component installers. Each installer will notify you if it detects a previous installation, and will upgrade to the more recent version of PEM.

You should invoke the PEM installers in the following order:

  1. Invoke the PEM agent installer on each monitored node except the PEM server node.

  2. Invoke the PEM server installer; this installer will upgrade both the PEM server and the PEM agent that resides on the PEM server node.

For detailed information about upgrading from a previous version, see the PEM Upgrade and Migration Guide.

Upgrading SQL Profiler on a Linux Host

To upgrade a SQL Profiler installation that resides on a Linux host:

  1. Delete the existing SQL Profiler query set on each node by invoking the uninstall-sql-profiler.sql script.

  • By default, if you are using Advanced Server on a Linux host, the script resides in:

    /opt/PostgresPlus/x.x/share/contrib

  • If you are using a PostgreSQL installation on a Linux host, the script resides in:

    /opt/PostgreSQL/x.x/share/postgresql/contrib

    Where x.x specifies the installed Postgres version.

  1. Then, invoke the new SQL Profiler installer on each node you wish to profile.

Upgrading SQL Profiler on a Windows Host

If you are using SQL Profiler on a Windows host, Windows will lock any files that have been executed or loaded into memory. To release any locked files, you must stop the Postgres server before performing an upgrade.

After stopping the Postgres Server:

  1. Delete the existing SQL Profiler query set on each node by invoking the uninstall-sql-profiler.sql script.

  • If you are using Advanced Server on a Windows host, the script resides in:

    C:\Program Files\PostgresPlus\x.x\share\contrib

  • If you are using a PostgreSQL installation on a Windows host, the script resides in:

    C:\Program Files\PostgreSQL\x.x\share\contrib

    Where x specifies the installed Postgres version.

  1. Invoke the new SQL Profiler installer on each node you wish to profile.

    Then, restart the Postgres Server, to resume profiling the node.

Troubleshooting

Upgrading SQL Profiler on a Windows Host

After upgrading to a newer version of SQL Profiler, if you encounter the following error:

An error has occurred:
ERROR: function return row and query-specified return row do not
  match
DETAIL: Returned row contains 11 attributes, but query expects 10.

To correct this error, you must replace the existing query set with a new query set. First, uninstall SQL Profiler by invoking the uninstall-sql-profiler.sql script, and then reinstall SQL Profiler by invoking the sql-profiler.sql script.

Uninstalling Postgres Enterprise Manager

The process of uninstalling the PEM server or agent is platform-specific. The name of the package for PEM server is edb-pem-server and for PEM agent is edb-pem-agent.

If you uninstall the PEM server package from a host, the PEM agent package installed on the same host doesn’t get uninstalled. But if you uninstall the PEM agent package, then the PEM server package installed on the same host also gets uninstalled.

Uninstalling PEM from Windows hosts

If the PEM installation resides on a Windows host, you can use the Windows Add/Remove Programs application to remove PEM components. Select the Add/Remove Programs option from the Windows Control Panel. When the control panel opens, locate the name of the PEM component in the program list. Click the Remove button to remove the component.

You can also invoke the uninstaller that resides at the following location:

C:\\Program Files\edb\pem\server

Uninstalling PEM from CentOS or RHEL hosts

You can use variations of the rpm, yum remove, or `` yum erase`` commands to remove the installed packages. Note that removing a package does not damage the PEM data directory.

  • Include the -e option when invoking the rpm command to remove an installed package; the command syntax is:

    rpm -e <package_name>

  • You can use the yum remove command to remove the pem server or agent package installed by yum. To remove a package, open a terminal window, assume superuser privileges, and enter the command:

    yum remove <package_name>

  • You can use the yum erase command to remove the pem server or agent package along with the edb-pem and edb-pem-docs dependencies. To remove a package, open a terminal window, assume superuser privileges, and enter the command:

    yum erase <package_name>

Where package_name is the name of the package that you would like to remove.

Uninstalling PEM from Debian or Ubuntu hosts

You can use apt-get remove or apt-get purge command to uninstall the PEM server or agent package from a Debian or Ubuntu host:

  • To uninstall PEM server or agent from a Debian or Ubuntu host without impacting the configuration files and data directories, invoke the following command:

    apt-get remove <package_name>

  • To uninstall PEM server or agent along with the configuration files and data directory, invoke the following command:

    apt-get purge <package_name>

Where package_name is the name of the package that you would like to remove.

Uninstalling PEM from SLES hosts

To uninstall PEM server or agent from a SLES host, invoke the following command:

zypper remove <package_name>

Where package_name is the name of the package that you would like to remove.