U is not here....
Tom, February 13, 2007 - 3:42 pm UTC
I don't know why it is so hard for people to go the extra distance (2 more keystrokes) to type you instead of 'u'.... Are we really that lazy or in that much of a hurry?
February 13, 2007 - 4:23 pm UTC
As you can probably tell, it is in fact a pet peeve of mine.
hw 2 sv kystrks
A reader, February 14, 2007 - 12:01 am UTC
It would have been less typing to phrase the question this way:
"What does ORA-1012 mean?"
I suppose Oracle could have beefed up the error message file so that the even less typing:
oerr ora 1012
at a Unix shell prompt would return a bit more detail than
01012, 00000, "not logged on"
// *Cause:
// *Action:
Something better would be along the lines of...
// *Cause: Please log on before executing SQL. If you
// were logged on, you may have missed a previous
// messages indicating why you were disconnected (e.g.
// fatal error message, session killed, instance
// shutting down, etc).
// *Action: Connect first or check for other error
// messages prior to ORA-1012.
.
I'm sure someone can improve on that wording. In some older version of Oracle, the oerr output used a bunch of OCI lingo, so it was not very understandable.
SP2-0640
Mr. U, February 14, 2007 - 7:26 am UTC
sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mi Feb 14 13:21:14 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
/nolog > select user from dual;
SP2-0640: Not connected
why don't I get an 01012 here ?
February 14, 2007 - 8:35 am UTC
because you are not connected
which is different from not being logged in.
sqlplus isn't connected to a database instance at all - there is nothing to submit your sql to and get a response back from
so, sqlplus tells you "hey, you are not connected - what do you want me to do with this nice string you just typed in"
Wouldn't it be simpler
M, February 14, 2007 - 11:37 am UTC
for Oracle to say:-
sqlplus tells you "hey, u are not connected "
Need more details
Bala, February 14, 2007 - 11:53 am UTC
What application are you running? What are the circumstances of the error?
If you are running Oracle Apps, check metalink Note:2105019.6
ORA-01012
Ivaylo, February 14, 2007 - 2:54 pm UTC
ora-01012 happens repeatly after switch off autotrace
A reader, November 30, 2011 - 3:25 am UTC
hi tom,
everytime after i switch off the autotrace, i will come accross ora-01012 error, and have to re-connect the DB.
Could you please kindly help?
BTW, this seems just begin to happen these days. I am learning DBA staff, and could be modify some parameter or settings, but not sure how and why can result in this.
One suspection is i create a profile to limit concurrent sessions per user as 2. And i learned from some place that after we enable autotrace, actually create another session.
But i have drop that profile and assign default to users.
below is what i copy out from my SQL*PLUS for your reference.
SQL> conn /as sysdba
Connected.
SQL> select sysdate from dual;
SYSDATE
---------
30-NOV-11
SQL> set autotrace on
SQL> set autotrace off
SQL> /
select sysdate from dual
*
ERROR at line 1:
ORA-01012: not logged on
Process ID: 7683
Session ID: 46 Serial number: 129
SQL>
November 30, 2011 - 7:15 am UTC
DO NOT USE SYSDBA FOR ANYTHING like this, just stop.
test with a regular user, stop using sysdba - that is just a really bad (horrifically bad) idea.