Urgent plz+ how to release locks when instance crashes
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Urgent plz+ how to release locks when instance crashes

  1. #1
    Join Date
    Feb 2007
    Posts
    20

    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.

    What should be done?

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    instance recovery is automatic, I am not really sure what is your point

  3. #3
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    Kill the process if its held a exclusive lock.
    "What is past is PROLOGUE"

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Can you please define for us what you mean with "instance failure". It is hard to read that followed by "Database is intact and not restarted"
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    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.

  5. #5
    Join Date
    Feb 2007
    Posts
    20

    instance failure means..

    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

  6. #6
    Join Date
    Feb 2007
    Posts
    20

    kill what? how to find which process to kill?

    Quote Originally Posted by dbasan
    Kill the process if its held a exclusive lock.
    kill what? how to find which process to kill?

  7. #7
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    what happened to your database, did it crash and go down?

  8. #8
    Join Date
    Sep 2001
    Location
    Makati, Philippines
    Posts
    857
    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.
    ---------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width