I resolved this issue.
If you are using an Oracle XA DataSource, Oracle's JDBC driver
will automatically issue a COMMIT when it sees a "DROP TABLE foobar"
statement.
Oracle's JDBC driver cannot properly execute a
DROP TABLE statement unless you are using a non-XA DataSource.
With the non-XA Oracle JDBC DataSource, I can happily execute
"DROP TABLE foobar"
My configuration:
1) IBM Websphere 5.0.2
2) database: Oracle9i release 2
3) Oracle JDBC DataSource, with XA enabled
4) driver class: oracle.jdbc.xa.client.OracleXADataSource
5) a servlet that uses JTA UserTransaction's
When I execute "DROP TABLE movies", the Oracle JDBC
driver throws a SQLException.
The exception message is
ORA-02089: COMMIT is not allowed in a subordinate session
Oracle's documentation says:
{{
ORA-02089: COMMIT is not allowed in a subordinate session
Cause: COMMIT was issued in a session that is not the two-phase commit
global coordinator.
}}
The strange thing is that I my code does not issue a COMMIT
Also, I disabled autocommit by calling
conn.setAutoCommit(false)
Here is the stack trace:
[7/19/03 12:10:02:936 PDT] 587e316 SystemErr R strMsg =
java.sql.SQLException: ORA-02089: COMMIT is not allowed in a
subordinate session
[...]
3 12826
The commit is NOT issued by the driver; it is issued by the database. Log
in to sqlplus and prove it to yourself.
eg
update something
drop a table
rollback
and the update will not be rolled back.
Jim
"Anonymous" <qc******@yahoo.comwrote in message
news:3c**************************@posting.google.c om...
I resolved this issue.
If you are using an Oracle XA DataSource, Oracle's JDBC driver
will automatically issue a COMMIT when it sees a "DROP TABLE foobar"
statement.
Oracle's JDBC driver cannot properly execute a
DROP TABLE statement unless you are using a non-XA DataSource.
With the non-XA Oracle JDBC DataSource, I can happily execute
"DROP TABLE foobar"
My configuration:
1) IBM Websphere 5.0.2
2) database: Oracle9i release 2
3) Oracle JDBC DataSource, with XA enabled
4) driver class: oracle.jdbc.xa.client.OracleXADataSource
5) a servlet that uses JTA UserTransaction's
When I execute "DROP TABLE movies", the Oracle JDBC
driver throws a SQLException.
The exception message is
ORA-02089: COMMIT is not allowed in a subordinate session
Oracle's documentation says:
{{
ORA-02089: COMMIT is not allowed in a subordinate session
Cause: COMMIT was issued in a session that is not the two-phase commit
global coordinator.
}}
The strange thing is that I my code does not issue a COMMIT
Also, I disabled autocommit by calling
conn.setAutoCommit(false)
Here is the stack trace:
[7/19/03 12:10:02:936 PDT] 587e316 SystemErr R strMsg =
java.sql.SQLException: ORA-02089: COMMIT is not allowed in a
subordinate session
[...]
Gentlemen,
To add a more general level to this thread: in Oracle *all* ddl statements have
an implied commit associated to them. That is: any creation, removal or change
of a database object forces a commit on the current transaction.
Regards,
Ruud de Koter.
Jim Kennedy wrote:
>
The commit is NOT issued by the driver; it is issued by the database. Log
in to sqlplus and prove it to yourself.
eg
update something
drop a table
rollback
and the update will not be rolled back.
Jim
"Anonymous" <qc******@yahoo.comwrote in message
news:3c**************************@posting.google.c om...
I resolved this issue.
If you are using an Oracle XA DataSource, Oracle's JDBC driver
will automatically issue a COMMIT when it sees a "DROP TABLE foobar"
statement.
Oracle's JDBC driver cannot properly execute a
DROP TABLE statement unless you are using a non-XA DataSource.
With the non-XA Oracle JDBC DataSource, I can happily execute
"DROP TABLE foobar"
My configuration:
>
1) IBM Websphere 5.0.2
2) database: Oracle9i release 2
3) Oracle JDBC DataSource, with XA enabled
4) driver class: oracle.jdbc.xa.client.OracleXADataSource
5) a servlet that uses JTA UserTransaction's
>
When I execute "DROP TABLE movies", the Oracle JDBC
driver throws a SQLException.
>
The exception message is
>
ORA-02089: COMMIT is not allowed in a subordinate session
>
Oracle's documentation says:
>
{{
>
ORA-02089: COMMIT is not allowed in a subordinate session
>
Cause: COMMIT was issued in a session that is not the two-phase commit
global coordinator.
>
}}
>
The strange thing is that I my code does not issue a COMMIT
>
Also, I disabled autocommit by calling
>
conn.setAutoCommit(false)
>
Here is the stack trace:
>
[7/19/03 12:10:02:936 PDT] 587e316 SystemErr R strMsg =
java.sql.SQLException: ORA-02089: COMMIT is not allowed in a
subordinate session
[...]
--
--------------------------------------------------------------------------------------
Ruud de Koter HP OpenView Software Business Unit
Senior Software Engineer IT Service Management Operation
Telephone: +31 (20) 514 15 89 Van Diemenstraat 200
Telefax : +31 (20) 514 15 90 PO Box 831
Telnet : 547 - 1589 1000 AV Amsterdam, the Netherlands
Email : ru**********@hp.com
internet: http://www.openview.hp.com/products/servicedesk
intranet: http://ovweb.bbn.hp.com/itservicemanager
--------------------------------------------------------------------------------------
Gentlemen,
To add a more general level to this thread: in Oracle *all* ddl statements have
an implied commit associated to them. That is: any creation, removal or change
of a database object forces a commit on the current transaction.
Regards,
Ruud de Koter.
Jim Kennedy wrote:
>
The commit is NOT issued by the driver; it is issued by the database. Log
in to sqlplus and prove it to yourself.
eg
update something
drop a table
rollback
and the update will not be rolled back.
Jim
"Anonymous" <qc******@yahoo.comwrote in message
news:3c**************************@posting.google.c om...
I resolved this issue.
If you are using an Oracle XA DataSource, Oracle's JDBC driver
will automatically issue a COMMIT when it sees a "DROP TABLE foobar"
statement.
Oracle's JDBC driver cannot properly execute a
DROP TABLE statement unless you are using a non-XA DataSource.
With the non-XA Oracle JDBC DataSource, I can happily execute
"DROP TABLE foobar"
My configuration:
>
1) IBM Websphere 5.0.2
2) database: Oracle9i release 2
3) Oracle JDBC DataSource, with XA enabled
4) driver class: oracle.jdbc.xa.client.OracleXADataSource
5) a servlet that uses JTA UserTransaction's
>
When I execute "DROP TABLE movies", the Oracle JDBC
driver throws a SQLException.
>
The exception message is
>
ORA-02089: COMMIT is not allowed in a subordinate session
>
Oracle's documentation says:
>
{{
>
ORA-02089: COMMIT is not allowed in a subordinate session
>
Cause: COMMIT was issued in a session that is not the two-phase commit
global coordinator.
>
}}
>
The strange thing is that I my code does not issue a COMMIT
>
Also, I disabled autocommit by calling
>
conn.setAutoCommit(false)
>
Here is the stack trace:
>
[7/19/03 12:10:02:936 PDT] 587e316 SystemErr R strMsg =
java.sql.SQLException: ORA-02089: COMMIT is not allowed in a
subordinate session
[...]
--
--------------------------------------------------------------------------------------
Ruud de Koter HP OpenView Software Business Unit
Senior Software Engineer IT Service Management Operation
Telephone: +31 (20) 514 15 89 Van Diemenstraat 200
Telefax : +31 (20) 514 15 90 PO Box 831
Telnet : 547 - 1589 1000 AV Amsterdam, the Netherlands
Email : ru**********@hp.com
internet: http://www.openview.hp.com/products/servicedesk
intranet: http://ovweb.bbn.hp.com/itservicemanager
-------------------------------------------------------------------------------------- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paul |
last post by:
hi,
i'm getting the following error when i try to run the code below to
connect to an oracle db:
java.lang.ClassnotfoundException:oracle.jdbc.driver.OracleDriver
java.sql.SQLException No...
|
by: David |
last post by:
Hello all,
I have been trying to use the OCI driver to connect to Oracle 9i, but
have been getting the following error:
java.sql.SQLException: Closed Connection
at...
|
by: JWM |
last post by:
I am trying to implement Oracle connection pooling for the following code,
which was written by someone else. Here is my main question -- this java
file creates code that is executed every hour,...
|
by: Markus Breuer |
last post by:
I have a question about oracle commit and transactions. Following scenario:
Process A performs a single sql-INSERT into a table and commits the
transaction. Then he informs process B (ipc) to...
|
by: Gregor =?UTF-8?B?S292YcSN?= |
last post by:
Hi!
I'm using DB2 database on one server and ORACLE database on the second one.
I want to move some data from ORACLE database to DB2 database and update
some columns on ORACLE database so I know...
|
by: Vinod Sadanandan |
last post by:
All,
Below listed are the new features in Oracle 11g ,please join me in this discussion to generate a testcase and analyze each of the listed features .
Precompilers:...
|
by: wnaveenkumar |
last post by:
package com.trewport.orderprocess.action;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.util.Date;
import java.lang.Object;
import javax.servlet.*;
import...
|
by: neuraljay |
last post by:
hi everyone. I am trying to build a jsp using webwork, hibernate and mysql. And right now I am doing its unit testing. Everytime I run the test I am getting this error:
Error JDBC exception on...
|
by: Jim Kennedy |
last post by:
ALL DDL does a commit. Hence Drop Table movies; issues a commit. True you
don't issue a commit and the driver does not issue a commit, but the server
does for all DDL.
That is probably where...
|
by: Edoardo |
last post by:
thanks guys,
I was hoping to be able to get the info from some method on oracle's own
jdbc implementation classes,
as both suggestion to use these view imply another trip to the db from
the...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| | |