BCA Error Logs

Does anyone know which database table the BCA error logs are stored on?

Thanks.

simon.


substring :us: (BOB member since 2004-01-16)

If you are talking about the log which shows whether jobs were successful or failed that table is DS_PENDING_JOB…is that what you meant?


Nick Daniels :uk: (BOB member since 2002-08-15)

Thanks. Yes it is. I am trying to write a small app to automatically email me or page me when a report fails.

simon.


substring :us: (BOB member since 2004-01-16)

Simon,

If you get that app working, I’d love to hear more about it. I am having all sorts of trouble keeping up with the “Cannot execute 5.0 macro” error that happens randomly.

Thanks,
Chris


cfachris :us: (BOB member since 2003-09-03)

In fact, if you get it working we’d love to have it as one of Bob’s Downloads! Chris, bear in mind that that message can be seen in bomgr_diag.log…maybe you could write another application which… :wink:


Nick Daniels :uk: (BOB member since 2002-08-15)

I use a (relatively) simple piece of SQL that queries the DS_PENDING_JOB tabel on errors. This is scheduled to run on strategic times (after important jobs, just before people leave for home :sleeping: ) and it emails me if there are errors. You then see the error as it is displayed in the console application.
I can post the SQL if you’re interested.

HenkK


HenkK :netherlands: (BOB member since 2004-03-02)

HenkK, if it is not too much of trouble, I like to see your SQL.

Mine is a small VB application using MAPI to email my text pager. I can simply schedule it to run on the WebI server.

Thanks.

simon.


substring :us: (BOB member since 2004-01-16)

Simon,

The SQL to check the BCA (formerly known as DocumentAgent) is started from a .cmd file using SQLPlus. The output log is filtered by find (if you’re not using English version please change) and if neccessary emailed to me. You have to change the name of the BCA (our queues are called BCAPROD and PCAUNIX).

The .cmd file:
@echo off
REM ================================================================================================
REM CheckDocAgent.Cmd - Windows NT script to check for errors in the BroadcastAgent via SQL
REM Update history 20021204 - HK, Initially built
REM ================================================================================================

echo %0
echo.

REM Start SqlPlus to check table DPBOSP.BOS.DS_PENDING_JOB
echo Running SQL command …
SqlPlus -s user/password@database @H:\BusinessObjects\CheckDocAgent.Sql

REM Search output file using FIND command
echo Checking for errors …
Type H:\BusinessObjects\CheckDocAgent.Log |find /I “no rows selected” > nul
if errorlevel 1 goto MYERROR
goto NOERROR

:MYERROR
REM Mail Error results
echo Mail errors …
postie -host:smtp.kruidvat.nl -to:h.koekkoek@nl.aswatson.com -from:CheckDocAgent@Nl.ASWatson.com -s:“Check DocAgent for errors” -msg:“CheckDocAgent.Log created, see attached file.” -a:H:\BusinessObjects\CheckDocAgent.Log
goto MYEND

:NOERROR
echo No errors found.
REM There are no rows to be returned, so presumably no errors, so do nothing
goto MYEND

:MYEND
Echo Done.

The SQL:
WHENEVER SQLERROR EXIT FAILURE

/* Define global variables */
–SET NUMWIDTH 6

Column BATCHID FORMAT 999999 HEADING ‘BatchID’
Column DOCID FORMAT 999999 HEADING ‘DocID’
Column Name FORMAT A30 HEADING ‘Document Name’ WRAP
Column Size FORMAT 999999999 HEADING ‘Size’
Column DESCR FORMAT A20 HEADING ‘Job description’ WRAP
Column User FORMAT A20 HEADING ‘User’
Column ERRORNO FORMAT 999999 HEADING ‘Error’
Column ERROR_TEXT FORMAT A45 HEADING ‘Error text’ WRAP
Column SCRIPT FORMAT A8 HEADING ‘Script’
Column STATUS FORMAT A18 HEADING ‘Status’

TTITLE ‘BroadcastAgent Errors’
BTITLE OFF
SET TERMOUT OFF
SET VERIFY OFF
SET ECHO OFF
SET FEEDBACK ON
SET HEADING ON
SET PAGESIZE 60
SET LINESIZE 500

/* Write the result to a file */

spool h:\businessobjects\checkdocagent.log

select
docagent.M_ACTOR_C_NAME,
das.batch_id BATCHID,
das.document_id DOCID,
usr.M_ACTOR_C_NAME “User”,
doc.M_DOC_C_NAME Name,
doc.M_DOC_N_SIZE “Size”,
das.job_desc DESCR,
das.job_error ERRORNO,
das.ERROR_TEXT,
das.job_script SCRIPT,
decode(das.job_status,
0, ‘Success’,
1, ‘Failure’,
2, ‘Waiting’,
3, ‘Running’,
4, ‘Suspended’,
6, ‘Delayed Execution’,
1001, ‘Failed, retrying …(1)’,
1002, ‘Failed, retrying …(2)’,
1003, ‘Failed, retrying …(3)’,
1004, ‘Failed, retrying …(4)’,
1005, ‘Failed, retrying …(5)’,
1006, ‘Expired’,
‘Unknown’)||’ (’||das.job_status||’)’ STATUS,
Decode(das.submit_datetime, 2087447296, Null, to_date(‘1970349000000’,‘yyyydddhh24miss’) + nvl(das.submit_datetime,0)/86400) submitted,
Decode(das.start_datetime, 2087447296, Null, to_date(‘1970349000000’,‘yyyydddhh24miss’) + nvl(das.start_datetime,0)/86400) started,
Decode(das.begin_date, 2087447296, Null, to_date(‘1970349000000’,‘yyyydddhh24miss’) + nvl(das.begin_date,0)/86400) begindate,
Decode(das.begin_time, 2087447296, Null, to_date(‘1970349000000’,‘yyyydddhh24miss’) + nvl(das.begin_time,0)/86400) begintime,
Decode(das.end_datetime, 2087447296, Null, to_date(‘1970349000000’,‘yyyydddhh24miss’) + nvl(das.end_datetime,0)/86400) enddate,
Decode(das.expiration_date, 2087447296, Null, to_date(‘1970349000000’,‘yyyydddhh24miss’) + nvl(das.expiration_date,0)/86400) expiration
from
bos.ds_pending_job das,
bos.obj_m_documents doc,
bos.obj_m_actor usr,
bos.obj_m_actor docagent
where
das.DOCUMENT_ID = doc.M_DOC_N_ID
and das.USER_SUBMIT_ID = usr.M_ACTOR_N_ID
and das.DOCSERVER_ID = docagent.M_ACTOR_N_ID
and das.job_status Not In (0,2,3,4,6)
and docagent.M_ACTOR_C_NAME IN (‘BCAPROD’, ‘BCAUNIX’)
order by
to_date(‘1970349000000’,‘yyyydddhh24miss’) + nvl(das.begin_date,0)/86400
/

SPOOL OFF;

EXIT

Good luck,
HenkK


HenkK :netherlands: (BOB member since 2004-03-02)