Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5989447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:06:09+00:00 2026-05-22T23:06:09+00:00

My app to recovers automatically from failures. I test it as follows: Start app

  • 0

My app to recovers automatically from failures. I test it as follows:

  1. Start app
  2. In the middle of processing, kill the application server host (shutdown -r -f)
  3. On host reboot, application server restarts (as a windows service)
  4. Application restarts
  5. Application tries to process, but is blocked by incomplete 2-phase commit transaction in Oracle DB from previous session.
  6. Somewhere between 10 and 30 minutes later the DB resolves the prior txn and processing continues OK.

I need it to continue processing faster than this. My DBA advises that I should prefix my statement with

ALTER SESSION ADVISE COMMIT;

But he can’t give me guarantees or details about the potential for data loss doing this.

Luckily the statement in question is simply updating a datetime value to SYSDATE every second or so, so if there was some data corruption it would last < 1 second before it was overwritten.

But, to my question. What exactly does the statement above do? How does Oracle resolve data synchronisation issues when it is used?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:06:10+00:00Added an answer on May 22, 2026 at 11:06 pm

    Can you clarify the role of the ‘local’ and ‘remote’ databases in your scenario.

    Generally a multi-db transaction does the following

    1. Starts the transaction
    2. Makes a change on on database
    3. Makes a change on the other database
    4. Gets the other database to ‘promise to commit’
    5. Commits locally
    6. Gets the remote db to commit

    In doubt transactions happen if step 4 is completed and then something fails. The general practice is to get the remote database back up and confirm if it committed. If so, step (5) goes ahead. If the remote component of the transaction can’t be committed, the local component is rolled back.

    Your description seems to refer to an app server failure which is a different kettle of fish. In your case, I think the scenario is as follows :

    1. App server takes a connection and starts a transaction
    2. App server dies without committing
    3. App server restarts and make a new database connection
    4. App server starts a new transaction on the new connection
    5. New transaction get ‘stuck’ waiting for a lock held by the old connection/transaction
    6. After 20 minutes, dead connection is terminated and transaction rolled back
    7. New transaction then continues

    In which case the solution is to kill off the old connection quicker, with a shorter timeout (eg SQLNET_EXPIRE_TIME in the sqlnet.ora of the server) or a manual ALTER SYSTEM KILL SESSION.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My app uses a WebRequest at certain points to get pages from itself. This
My app needs to build a buffer from all the selected cells on a
My android app fetches a JSON structure from the net. It's somewhat large, maybe
Our app needs to add large amounts of text to SQL Server 2005 database
We have several java application server running here, with several apps. They all log
Recently, I upload the web application in my local to Google App Engine c:\LocalProject>c:\appengine-java-sdk-1.2.2\bin\appcfg.cmd
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com
app.get('/', function (req, res) { res.render('home.jade', { results: req.session.value }); }); What i would
My app has many controls on its surface, and more are added dynamically at
An app I'm writing always crashes on a clients computer, but I don't get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.