Hi Dirk,

omoracle seem to be highly optimized in regard to Oracle. It is contributed 
code, so it probably is best to contact the author directly (he works at CERN, 
mail address is in module doc). If that fails, you might want to consider using 
omlibdbi with the Oracle driver. I myself do not even have an Oracle test 
environment.

Rainer

> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Dirk Jahnke-Zumbusch (DESY)
> Sent: Friday, June 29, 2012 1:50 PM
> To: '[email protected]'
> Subject: [rsyslog] Multiple actions with different SQL statements
> (omoracle)
> 
> Hi all,
> 
> a question about an omoracle problem and rsyslog 6.2.2:
> 
> I specified two actions and templates to run two
> different SQL commands with the omoracle Module.
> 
> It's roughly like this:
> 
> $ActionQueueType LinkedList # use asynchronous processing
> $ActionQueueFileName dbq    # set file name, also enables disk mode
> $ActionResumeRetryCount -1  # infinite retries on insert failure
> $ModLoad omoracle
> $OmoracleDBUser THE_USER
> $OmoracleDBPassword THE_PW
> $OmoracleDB TNS_NAME
> $OmoracleBatchSize 1
> $OmoracleBatchItemSize 4096
> $OmoracleStatementTemplate OmoracleStatementI
> $template OmoracleStatementI,"INSERT INTO TEST_RSYSLOG(COLUMN1,COLUMN2)
> values(:COLUMN1,:COLUMN2)"
> $template OraInsert1,"%msg%%msg:9:9%"
> 
> if $msg contains 'SQL: I ' then :omoracle:;OraInsert1
> 
> $ActionQueueType LinkedList # use asynchronous processing
> $ActionQueueFileName dbq    # set file name, also enables disk mode
> $ActionResumeRetryCount -1  # infinite retries on insert failure
> $ModLoad omoracle
> $OmoracleDBUser THE_USER
> $OmoracleDBPassword THE_PW
> $OmoracleDB TNS_NAME
> $OmoracleBatchSize 1
> $OmoracleBatchItemSize 4096
> $OmoracleStatementTemplate OmoracleStatementX
> #$template OmoracleStatementX,"INSERT INTO
> TEST_RSYSLOG(COLUMN3,COLUMN4)
> values(:COLUMN3,:COLUMN4)"
> $template OmoracleStatementX,"UPDATE T_RSYSLOG SET COLUMN4=:AA;"
> $template OraInsert2,"%msg%%msg:9:9%"
> 
> if $msg contains 'SQL: U' then :omoracle:;OraInsert2
> 
> The result is, that the (unconditional!) update of (all rows!) COLUMN4
> is not executed. This works however with the second INSERT template,
> which inserts into COLUMN3 and COLUMN4.
> 
> So, why works the INSERT and not the UPDATE?
> 
> NB: what I really try to achieve is inserting in the first step
> a new row into the table and then update later on that row with
> data, which comes later on in the logging process. For testing
> I just tried to strip down to something easy.
> 
> Best regards
> Dirk
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards

Reply via email to