I'm trying to find the oracle error's description in SQL*PLUS. Similar command in DB2 as
? SQLXXXX
Where XXXX
is the error number.
-
1we have a new CLI, SQLcl. We have error message lookup built into the tool, you can simply run OERR in the program, and no need to install an Oracle client oracle.com/technetwork/developer-tools/sqlcl/overview/…thatjeffsmith– thatjeffsmith2017年02月03日 14:11:07 +00:00Commented Feb 3, 2017 at 14:11
3 Answers 3
You can use oerr utility.
Example:
[oracle@ora12c Desktop]$ oerr ora 01950
01950, 00000, "no privileges on tablespace '%s'"
Cause: User does not have privileges to allocate an extent in the
specified tablespace.
Action: Grant the user the appropriate system privileges or grant the user
space resource on the tablespace.
You can search error code on this webpage Search for Error Messages or you can download the Database Error Messages documentation from here.
Note: This utility is not available on Windows.
-
Thanks for the reply. But i'm using Windows OS.So there is no utility for it?azardin– azardin2017年02月03日 08:18:52 +00:00Commented Feb 3, 2017 at 8:18
You can prepend an exclamation mark !
in SQL*Plus to any shell command which will allow you to execute the command without leaving SQL*Plus:
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
SQL> !oerr ora 01950
01950, 00000, "no privileges on tablespace '%s'"
// *Cause: User does not have privileges to allocate an extent in the
// specified tablespace.
// *Action: Grant the user the appropriate system privileges or grant the user
// space resource on the tablespace.
SQL>
Well, for Windows, i can only remember calling the the SQLERRM function.
Something like this: BEGIN
DBMS_OUTPUT.PUT_LINE('SQLERRM(-6511): ' || TO_CHAR(SQLERRM(-6511)));
END;