Long running Query question
So I have an oracle query that could potentially take more than an hour to return results. It's ugly but that's the way it goes. The problem I'm having is once the query is sent off the connection sits idle with no packets in or out. The TCP idle timeout in our firewall drops the connection after an hour. I can't extend that timeout any further. Is there some way to send a keep alive packet of some sort over that idle connection so the firewall doesn't close it? I have tried just firing off another query every 10 minutes but that doesnt go over the same connection so it doesnt work.
Interestingly enough when the connection is closed at the firewall the go app doesn't even know about it. It just continues waiting for that idle connection to return something.
If you can use tnsnames.ora and sqlnet.ora, you should check the sqlnet.ora parameter sqlnet.expire_time (see https://docs.oracle.com/en/database/oracle/oracle-database/12.2/netrf/parameters-for-the-sqlnet-ora-file.html#GUID-1070805B-0703-457C-8D2E-4EEC26193E5F).
There is a paper about Dead Connection Detection dated few years ago, but it is still applicable (https://www.oracle.com/technetwork/database/enterprise-edition/oraclenetdcd-2179641.pdf).
Try enabling DCD on the server as described in the paper.