Does anyone know which database table the BCA error logs are stored on?
Thanks.
simon.
substring (BOB member since 2004-01-16)
Does anyone know which database table the BCA error logs are stored on?
Thanks.
simon.
substring (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 (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 (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 (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âŚ
Nick Daniels (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 ) 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 (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 (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 (BOB member since 2004-03-02)