Running SQL in Siebel Logs

By using SPUFI or the command line, you can construct SQL queries to run against the staging or the target log tables.

The following statements report the status of the load jobs for the staging and target databases:

SELECT JOB_DESC, JOB_NAME, JOB_STATUS FROM CQ10A901.TMP_SBLLOG_STG WHERE JOB_NAME 
LIKE 'LKC%';
SELECT JOB_DESC, JOB_NAME, JOB_STATUS FROM CQ10A901.TMP_SBLLOG_TAR WHERE JOB_NAME 
LIKE 'LKC%';

You can alter the preceding statements to report the status of any jobs by changing the JOB_NAME LIKE statement to another prefix.

This following statement checks for failed unload jobs, but can check for any other job by changing the JOB_NAME LIKE statement to use the appropriate prefix.

SELECT JOB_DESC, JOB_NAME, JOB_STATUS FROM CQ10K034.TMP_SBLLOG_STG WHERE JOB_STATUS != 'COMPLETED SUCCESSFUL' AND JOB_NAME LIKE 'LKB%';