Incorrect SQL Archiving script in documentation.

Incorrect SQL Archiving script in documentation.

book

Article ID: KB0093598

calendar_today

Updated On:

Products Versions
TIBCO BusinessConnect -
Not Applicable -

Description

Description:
An incorrect SQL Archiving script is documented in the BusinessConnect Interior Server Administration Manual Appendix A "Database Schema Definition" Section "Audit Schema Details" subsection "BC_MESSAGES" table.
Symptoms:
SQL script does not archive database correctly.
Cause:
Incorrect script documentation.

Issue/Introduction

Incorrect SQL Archiving script in documentation.

Resolution

The incorrect script documented is:


Select * from BC_MESSAGES where
STATUS IN (
select STATUS from BC_TRANSACTIONS where BC_TRANS_ID = BC_MESSAGES.BC_TRANS_ID AND 
ts <= TO_TIMESTAMP(<from date>, 'YYYY-MM-DD HH24:MI:SS.FF') AND 
ts >= TO_TIMESTAMP(<to date>,'YYYY-MM-DD HH24:MI:SS.FF')
) IN ('COMPLETED', 'ERROR')
)


The correct script should look like the following:



Select * from BC_MESSAGES where BC_TRANS_ID IN ( select BC_TRANS_ID from
BC_TRANSACTIONS where ts >= TO_TIMESTAMP(<from_date>, 'YYYY-MM-DD') AND

ts <= TO_TIMESTAMP(<to_date>,'YYYY-MM-DD')) AND status IN ('COMPLETED', 'ERROR');



Additional Information

 BusinessConnect Interior Server Administration Manual