On 2005-01-07 22:31:22 -0000, Sunil A.V. wrote:
> I am using perl DBI
> Most of my perl code use prepared statements like this
[example code snipped]
> But my database abdw does go to maintenance many times. So my perl
> code at those times will wait till the database problems get right.

I don't think so. Your code will just continue since you don't check for
errors.

> What I want is when there is some db problems [even for that matter
> when tables are locked by some other user for long time] then my perl
> code should exit to calling program with say a exitcode of 1. Is there
> any way in code to handle this.

Search for RaiseError in the DBI manual.

I don't know if you can set timeouts for Oracle queries (I seem to
remember some timeout related problems when accessing an Oracle DB from
MS Access, but I don't remember if it was an Oracle timeout or an Access
timeout).
If you simply want your script to die on a timeout, look at alarm.

        hp

-- 
   _  | Peter J. Holzer      | If the code is old but the problem is new
|_|_) | Sysadmin WSR / LUGA  | then the code probably isn't the problem.
| |   | [EMAIL PROTECTED]        |
__/   | http://www.hjp.at/   |     -- Tim Bunce on dbi-users, 2004-11-05

Attachment: pgpKcnu016Hk1.pgp
Description: PGP signature

Reply via email to