After I issue a COMMIT WRITE NOWAIT in Oracle, how can I find out when the transaction has become durable?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
I’m assuming that you’re asking about the new (in 10.2) asynchronous commit operation
versus the old commit operation (in the new long-form syntax)
If you specify WAIT, the transaction is durable when the commit operation returns. If you specify NOWAIT, you won’t get any notification that LGWR has actually written your data to disk. At the next log switch, assuming you know the current SCN, V$LOG should verify that the data is actually on disk since you’ll have a log group with a FIRST_CHANGE# greater than the SCN of your transaction, but that’s not useful if you’re looking for a more immediate notification. You could run a trace to see when the data is actually written as well, but that wouldn’t be useful from an application.
If you are looking for a more or less immediate notification that your transaction has actually been written to disk when using asynchronous commits, can you explain the business problem you’re trying to solve? Perhaps there is an alternate way of accomplishing whatever goal you have.