Urgent plz+ how to release locks when instance crashes
i have a database service connected to Oracle 9i and it is connected to database using jdbc drivers.
now if due to instance failure, that service and stops and then i restart the web server and run a program for recovery. This recovery program rollbacks all transactions after last commit in transaction that was going on at time of failure.
Database is intact and not restarted. If we restart it, PMON itself will release locks. But here, how to release locks and do rollback..coz memory would have effect of queries executed before failure + locks held ...since database is not restarted in this case.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
service that did connectivity with database and was firring queries and say electricity went and transactions holded locks, but that service needs to be restarted on server and rollback/resubmit those transactions
Correct me if I'm wrong, you might be referring to a session from the application server to the database server that was caught trap when let's say application server error occured and not really the instance referred usually here as the database instance.
If my guess is right, you wanted to clear those session that could still be in the database server, and from the application server you have a facility to undo this incomplete transaction.
Well, the database itself has a facility to clean those session that are considered dead connection. But if you really need something from the oracle database to detect and disconnect those dead connection as soon as possible, As far as I can remember there is a way to do that, and it is configured in sqlnet.ora. Please research on Dead Connection Detection.