After a network failure cannot update a record

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
PierPaq
Posts: 2
Joined: Thu 17 Jun 2010 10:13

After a network failure cannot update a record

Post by PierPaq » Thu 17 Jun 2010 10:30

Hi,
I have a problem with an application using ODAC.

The application run locally and is written in Delphi 5 with last ODAC.
The Oracle Server is remotely reachable via dedicate network.

All works fine.

Now I'm working to an upgrade of the local application, to improve stability.

I'm working around a boring problem: sometimes the network fails, and if an UPDATE statement was sent to the Oracle Server just before the network problem, restarting the local application and redo the UPDATE it simply stay waiting for the releasing of previous lock (set by the update statement sent).

Any suggestion about this problem?

Is there a way to unlock the updated record, locked after the network failure?

In other words, the first UPDATE lock a record on a remote table;
before to release the lock with a COMMIT, a network failure put the Oracle server in a strange status.
After the restart of the local application, doing a SELECT * FROM I saw that the update sent before the crash, has been rolled back, or almost it has not updated the record, but the record is still locked.

Hope been enough clear in my description.

Hope to receive some helps,
Best regards,
Piero

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Fri 18 Jun 2010 08:19

Hello

Record is locked if session wasn't disconnected correctly (for example on network lag). In this case to remove lock from the record you should kill the hanged session. To kill an Oracle session you can use the Oracle command "ALTER SYSTEM KILL SESSION". You can find more detailed information about this command in the Oracle documentation.

PierPaq
Posts: 2
Joined: Thu 17 Jun 2010 10:13

Post by PierPaq » Fri 18 Jun 2010 09:58

Many thanks for the reply.

I will take a look to the documentation.

Have a good day,

Piero

Post Reply