Posts Tagged ‘sqlplus’
TWO_TASK is actually still used.
You’ll have to forgive my obtuseness. I only ever log into my Oracle servers as “oracle” and am able to login locally with
$ sqlplus / as sysdba
or
$ sqlplus dts
So today I was a little scared when I couldn’t do this from an OS user other than oracle. The $ORACLE_SID variable was indeed set correctly. After quite a bit of hot Google action it turns out that sqlplus still uses the TWO_TASK environment variable. For some reason I had assumed it was deprecated and/or obsolete since I had never had to use it.
Sometimes it helps to step down from the mountaintop for a clearer view.
sqlplus commit-on-exit?
ACHTUNG: Did you know that SQL*Plus issues a COMMIT when you exit? This has nothing to do with the AUTOCOMMIT setting, which will automatically commit after every statement in sqlplus.
If you issue a graceful exit (via the “exit” or “quit” command), sqlplus will always issue a commit. However, if you were to be ungracefully disconnected, for example by closing your terminal window, then PMON will issue a rollback like it does with any other disconnected session.
Here’s a small oracle-l thread about it as well. Google also turns up an Eddie Awad post on it. Of course it turns out that this is a documented “feature”:
“Regardless of the AUTOCOMMIT setting, changes are committed when you exit SQL*Plus successfully.”
set autotrace traceonly
This is usually a sign that you need a better index:
880637 consistent gets189017 physical reads



