Need help on how to use Perl DBI script to poll logs from oracle databases?

Can't Post

Hi,

Am not sure if this has anything to do with perl programming but would like to seek your advice.

I have 2 separate servers each with oracle database installed.I am trying to pull oracle logs from these 2 databases to my main linux server using perl DBI. On this linux server I have 1 dbipoll.pl script and 2 wrapper scripts that pass in parameters to dbipoll.pl.

The scripts I've used are found here: http://www.james.labocki.com/?p=153

Here is the sample wrapper script that I've used to call dbipoll.pl(separate script with different parameters for each databases used):

As you can see,the script should retrieve logs and write to oracledb1.log and update the countfile1 with the latest timestamp.The wrapper scripts are scheduled to run at 5mins interval.

The first wrapper script,which I've named as call_dbipoll1.sh runs fine. I am able to retrieve events and both oracledb1.log and countfile1 are successfully updated.

However,the second wrapper script,call_dbipoll2.sh is successful only for the first run. For subsequent runs,I've noticed that countfile2 does not get updated with the latest timestamp(ie. the file returns to blank) and oracledb2.log returns to blank as well. Therefore,am unable to pull new events then. Unable to determine what went wrong here..

Here is sample of my second wrapper script that tries to retrieve events from the 2nd database: