PSQLException: ERROR: function prune_apm_data(bigint, bigint) does not exist

Document ID : KB000030383
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

This error occurs when the prune_apm_data function is not added to the APM database after a Postgres installation or upgrade.

 

Solution:

The following ERROR appears in the Introscope Enterprise Manager log:


[ERROR] [org.quartz.core.JobRunShell] Job DEFAULT.jobDetailBean threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'pruneData' on target class [class com.wily.apm.model.pruning.DataPruner] failed; nested exception is

org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback; bad SQL grammar [{? = call prune_apm_data(?, ?)}]; nested exception is org.postgresql.util.PSQLException: ERROR: function

prune_apm_data(bigint, bigint) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 15 



To resolve this error, run the command below to install this function manually from the "APMDatabase_home\bin" directory:

psql -U admin -d cemdb -f <path to apm-procedures-postgres-x.x.x.x.sql


Where x.x.x.x is the APM version.


e.g. (Windows environment + EM 9.7.1.0):

C:\APM\Database9710\bin>psql -U admin -d cemdb -f "C:\APM\Introscope9.7.1.16\install\database-scripts\apm-procedures-postgres-9.7.1.0.sql"
Password for user admin:


e.g. (RHEL 6.5 environment + EM 9.7.1.0):

[root@sanjo24 bin]# psql -U admin -d cemdb -f /APM/Introscope9710/install/database-scripts/apm-procedures-postgres-9.7.1.0.sql
Password for user admin: