Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

PR_LOG_REPORTSTATS is unavailable due to error during purge

SA-39703

Summary



PR_LOG_REPORTSTATS is unavailable due to error during purge.


Error Messages




2017-05-23 00:00:00,081 [ PegaRULES-Batch-5] [ STANDARD] [ ] [ PegaRULES:07.10] (al.access.ReportStatisticsImpl) ERROR - Database Error occured while calling the sppr_purge_table store proc
com.pega.pegarules.pub.database.DatabaseException: Problem encountered executing a stored procedure: code: -1477 SQLState: 55019 Message: DB2 SQL Error: SQLCODE=-1477, SQLSTATE=55019, SQLERRMC=PEGA_DATA.PR_LOG_REPORTSTATS;4;10, DRIVER=3.62.56
From: (BD89D2960348B560CDB7381A18347F2BC)
SQL: {call PEGA_DATA.sppr_purge_table (?,?,?)}
SQL Inserts: <PEGA_DATA.pr_log_reportstats> <pxCreateDateTime> <30>

Caused by SQL Problems.
Problem #1, SQLState 55019, Error code -1477: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-1477, SQLSTATE=55019, SQLERRMC=PEGA_DATA.PR_LOG_REPORTSTATS;4;10, DRIVER=3.62.56
at com.pega.pegarules.data.internal.access.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:262)
at com.pega.pegarules.data.internal.access.SQLGenerator.callStoredProc(SQLGenerator.java:3333)
at com.pega.pegarules.data.internal.access.DatabaseImpl.callStoredProc(DatabaseImpl.java:10165)
at com.pega.pegarules.data.internal.access.SQLGenerator.purgeTableContainingClass(SQLGenerator.java:2888)
at com.pega.pegarules.data.internal.access.ReportStatisticsImpl.purgeReportStatsShutDown(ReportStatisticsImpl.java:256)
at com.pega.pegarules.data.internal.access.ReportStatisticsImpl.purgeReportStats(ReportStatisticsImpl.java:275)
at com.pegarules.generated.activity.ra_action_systemcleaner_086584e6b8a1ac0ea644fcb3ea53969f.step3_circum0(ra_action_systemcleaner_086584e6b8a1ac0ea644fcb3ea53969f.java:534)
at com.pegarules.generated.activity.ra_action_systemcleaner_086584e6b8a1ac0ea644fcb3ea53969f.perform(ra_action_systemcleaner_086584e6b8a1ac0ea644fcb3ea53969f.java:103)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.runActivity(QueueProcessor.java:721)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:602)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:945)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1259)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1008)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:901)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:670)
at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:991)
at com.pega.jsr166backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:532)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-1477, SQLSTATE=55019, SQLERRMC=PEGA_DATA.PR_LOG_REPORTSTATS;4;10, DRIVER=3.62.56
at com.ibm.db2.jcc.am.fd.a(fd.java:679)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
at com.ibm.db2.jcc.am.fd.a(fd.java:127)
at com.ibm.db2.jcc.am.jn.b(jn.java:2299)
at com.ibm.db2.jcc.am.jn.c(jn.java:2282)
at com.ibm.db2.jcc.t4.cb.k(cb.java:370)
at com.ibm.db2.jcc.t4.cb.e(cb.java:98)
at com.ibm.db2.jcc.t4.q.e(q.java:81)
at com.ibm.db2.jcc.t4.rb.k(rb.java:160)
at com.ibm.db2.jcc.am.jn.jb(jn.java:2248)
at com.ibm.db2.jcc.am.kn.b(kn.java:4078)
at com.ibm.db2.jcc.am.ln.fc(ln.java:113)
at com.ibm.db2.jcc.am.ln.execute(ln.java:96)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:173)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:173)
at com.pega.pegarules.data.internal.access.DatabasePreparedStatementImpl.execute(DatabasePreparedStatementImpl.java:581)
at com.pega.pegarules.data.internal.access.SQLGenerator.callStoredProc(SQLGenerator.java:3276)
... 17 more


Steps to Reproduce



Not Applicable


Root Cause



A defect or configuration issue in the operating environment During a purge of a table is put into a nologging state using this statement.
'ALTER TABLE ' || tablename || ' activate not logged initially'

If something goes wrong while the table is in this state, then the database engine does not allow any access to the table and the above error is generated.


Resolution



Make the following change to the operating environment:

In this case the table must be dropped from the database and recreated using the following syntax.


create table PEGA_DATA.pr_log_reportstats
(
pxCommitDateTime TIMESTAMP,
pxSaveDateTime TIMESTAMP,
pxCreateDateTime TIMESTAMP,
pxCreateSystemID VARCHAR(32),
pxInsName VARCHAR(512),
pxObjClass VARCHAR(96),
pxSessionId VARCHAR(128),
pyClassName VARCHAR(96),
pxErrorCount DECIMAL(18),
pxTotalElapsedTime DECIMAL(18),
pxModeOfExecution VARCHAR(32),
pxReportExecutionCount DECIMAL(18),
pxReportInsKey VARCHAR(255),
pxReportOperator VARCHAR(128),
pyStreamName VARCHAR(64),
pxRowsRetrieved DECIMAL(18),
pzInsKey VARCHAR(512) NOT NULL
)
@
ALTER TABLE PEGA_DATA.pr_log_reportstats
ADD CONSTRAINT pr_log_rrtstats_PK PRIMARY KEY
(
pzInsKey
)
@

CREATE INDEX PEGA_DATA.pr_log_reportstats_idx1
ON PEGA_DATA.pr_log_reportstats
(
pxCreateDateTime asc
)
@

Published August 17, 2017 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us