And while we're at it, how do I switch between autocommit and non-autocommit?
The COPY statement, by default, commits on completion, so it does not matter which AUTOCOMMIT mode you use, unless you issue COPY NO COMMIT. Please note that DDL statements are autocommitted. To tell if AUTOCOMMIT is on or off, issue the set command: $ \set ... AUTOCOMMIT = 'off' ...
Well, it is not an Oracle configuration issue -- the only method Oracle operates in is "client tells us when to commit". We do not have an autocommit mode. Various TOOLS and API's do (eg: I can tell sqlplus to autocommit, that just means sqlplus will issue a commit after each statement).
Auto-commit mode means that when a statement is completed, the method commit is called on that statement automatically. Auto-commit in effect makes every SQL statement a transaction. The commit occurs when the statement completes or the next statement is executed, whichever comes first.
You can disable auto-commit with the Connection class's setAutoCommit method.
There is no such thing as autocommit in Oracle (server). Some client applications however default to autocommit (meaning they deliberately issue a commit between each statement). You will have to read the documentation of your application in order to determine if this is the case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With