Getting around one-hour Linux disconnects?

(Sorry if this is some sort of FAQ - the firewall at my office doesn’t let me use the forum’s search feature for some reason)

My office has Oracle installed on Linux-based systems. Whenever I run a script that takes longer than an hour - even if it is a set of separate steps (e.g. a number of “execute {procedure_name}” lines - the connection is dropped, and the only way I know this is to check V$SESSION (or, when I click on “Cancel”, the error message is something like ORA-12152 (TNS:unable to send break message).

Is there a way to, for lack of a better term for it, “ping” the server every few minutes while the script is running so it maintains the connection?


Is there a way to, for lack of a better term for it, "ping" the server every
few minutes

Once the client is waiting for a response from the database, there’s not
much you can do with that particular connection.

My suggestion would be to break your script into logical sections that you
expect to take less than an hour. That way you can test the flow in your dev
environment without running into the 1 hour limit.

The alternative – depending on your exact situation – would be to
talk to the DBA’s and see if you can get the limit increased.

For example, let’s say everything you’re doing is streamlined for
performance and the total run time is 1.5 hours. Your Dev and Prod environments
match on both resources and the 1 hour limit so you can expect the process to
take 1.5 hours in prod – and be cancelled.

In such a situation, if you absolutely must run the process in a single
“batch” run – as opposed to multiple smaller tasks running
sequentially – then you may very well have a good case to present to get
the limit increased.

Roger S.

I should add: I made the assumption that it was the database – not OS
server – with the 1 hour limit. This is based on the assumption that your
client is local to your desktop. Ie: you’re not using telnet to access the
Linux box, then running sqlplus from there.

Roger S.

How about running the script from a cron?

Did you know that TOAD has a cron job facility for scheduling and managing the
executions J