Defining Your Own Error Messages: Procedure RAISE_APPLICATION_ERROR
The procedure RAISE_APPLICATION_ERROR lets you issue user-defined ORA- error messages from stored subprograms. That way, you can report errors to your application and avoid returning unhandled exceptions.
To call RAISE_APPLICATION_ERROR, use the syntax
raise_application_error(error_number, message[, {TRUE | FALSE}]);
where error_number is a negative integer in the range -20000 .. -20999 and message is a character string up to 2048 bytes long. If the optional third parameter is TRUE, the error is placed on the stack of previous errors. If the parameter is FALSE (the default), the error replaces all previous errors. RAISE_APPLICATION_ERROR is part of package DBMS_STANDARD, and as with package STANDARD, you do not need to qualify references to it.
Sounds cool and very easy to implement.
But recently I found out that even Oracle itself, is using the same custom segment for it's own PL/SQL error codes. This came to mine mind once suddenly, while I was grepping through SYSMAN PL/SQL source schema, searching for something else. The matter of fact, I found out that this is not an exception but regular case. So to be able to grep the whole source, next script is greping through
sys.dba_source
on SYS, SYSTEM and SYSMAN schemas only:
set linesize 170 set pagesize 200 col excode for a6 col owner for a10 col TYPE for A15 col name for A24 col exname for A32 col LINE for 9990 col TEXT for a60 WITH data AS ( SELECT ( '^.*PRAGMA\s+EXCEPTION_INIT\s*\(\s*' -- PRAGMA EXCPETION_INIT( || '([A-Z0-9_$#]{1,30}|"[^"]{1,30}")' -- Exception-Name -- comment the following line out, if the exception_name -- and the exception code are on different lines || '\s*,\s*''?(-?\d{1,5})''?' -- Exception-Code ------- || '.*$' -- End-of-Line ) AS rx , (' ' || CHR (10) || CHR (13) || CHR (9)) AS trimset FROM DUAL ) , data_source AS ( SELECT s.owner , s.TYPE , s.name , s.line , UPPER (RTRIM (s.text, (' ' || CHR (10) || CHR (13)))) AS text FROM data d, dba_source s WHERE REGEXP_LIKE (s.text, d.rx, 'i') ) , data_prepared AS ( SELECT ds.owner , ds.TYPE , ds.name , ds.line , ds.text , REGEXP_REPLACE (ds.text, d.rx, '\1') AS exname , REGEXP_REPLACE (ds.text, d.rx, '\2') AS excode FROM data d, data_source ds ) SELECT dp.excode , dp.owner , dp.TYPE , dp.name , dp.exname , dp.line , dp.text FROM data_prepared dp WHERE (TO_NUMBER (dp.excode) BETWEEN -20999 AND -20000) AND dp.owner IN ('SYS', 'SYSMAN', 'SYSTEM') ORDER BY TO_NUMBER (dp.excode) DESC , dp.owner , dp.TYPE , dp.name;The result is really amazing:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> / EXCODE OWNER TYPE NAME EXNAME LINE TEXT ------ ------- ---------- ------------------------ -------------------------------- ----- ------------------------------------------------------ -20000 SYSMAN PACKAGE BODY MGMT_ECM_POLICY EVALUATE_EXCEPTION 6 PRAGMA EXCEPTION_INIT( EVALUATE_EXCEPTION, -20000 ); -20025 SYS PROCEDURE AW_DROP_PROC DBERR20 5 PRAGMA EXCEPTION_INIT(DBERR20, -20025); -20197 SYSMAN PACKAGE MGMT_GLOBAL INVALID_USER_PWD 184 PRAGMA EXCEPTION_INIT(INVALID_USER_PWD, -20197); -20199 SYSMAN PACKAGE MGMT_GLOBAL EM_LOCK_CONTEXT 189 PRAGMA EXCEPTION_INIT(EM_LOCK_CONTEXT, -20199); -20200 SYSMAN PACKAGE EM_SEVERITY_REPOS SEV_EVAL_PROC_NOT_FOUND 28 PRAGMA EXCEPTION_INIT(SEV_EVAL_PROC_NOT_FOUND, -20200); -20200 SYSMAN PACKAGE MGMT_GLOBAL INVALID_USER_NAME 194 PRAGMA EXCEPTION_INIT(INVALID_USER_NAME, -20200); -20201 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PASSWORD 199 PRAGMA EXCEPTION_INIT(INVALID_PASSWORD, -20201); -20202 SYSMAN PACKAGE EM_SEVERITY_REPOS UNSUPPORTED_TARGET 33 PRAGMA EXCEPTION_INIT(UNSUPPORTED_TARGET, -20202); -20202 SYSMAN PACKAGE MGMT_GLOBAL DUPLICATE_USER 204 PRAGMA EXCEPTION_INIT(DUPLICATE_USER, -20202); -20203 SYSMAN PACKAGE EM_SEVERITY_REPOS SEV_EVAL_PROC_NOT_FOUND 38 PRAGMA EXCEPTION_INIT(SEV_EVAL_PROC_NOT_FOUND, -20203); -20203 SYSMAN PACKAGE MGMT_GLOBAL INVALID_ROLE_NAME 209 PRAGMA EXCEPTION_INIT(INVALID_ROLE_NAME, -20203); -20204 SYSMAN PACKAGE MGMT_GLOBAL USER_DOES_NOT_EXIST 214 PRAGMA EXCEPTION_INIT(USER_DOES_NOT_EXIST, -20204); -20205 SYSMAN PACKAGE MGMT_GLOBAL ROLE_DOES_NOT_EXIST 219 PRAGMA EXCEPTION_INIT(ROLE_DOES_NOT_EXIST, -20205); -20206 SYSMAN PACKAGE MGMT_GLOBAL TARGET_DOES_NOT_EXIST 224 PRAGMA EXCEPTION_INIT(TARGET_DOES_NOT_EXIST, -20206); -20207 SYSMAN PACKAGE MGMT_GLOBAL INVALID_DESCRIPTION 229 PRAGMA EXCEPTION_INIT(INVALID_DESCRIPTION, -20207); -20208 SYSMAN PACKAGE MGMT_GLOBAL DELETE_ALL_TARGETS 234 PRAGMA EXCEPTION_INIT(DELETE_ALL_TARGETS, -20208); -20209 SYSMAN PACKAGE MGMT_GLOBAL EDIT_ALL_TARGETS 239 PRAGMA EXCEPTION_INIT(EDIT_ALL_TARGETS, -20209); -20210 SYSMAN PACKAGE MGMT_GLOBAL DELETE_SUPERUSER 244 PRAGMA EXCEPTION_INIT(DELETE_SUPERUSER, -20210); -20211 SYSMAN PACKAGE MGMT_GLOBAL DUPLICATE_ROLE 249 PRAGMA EXCEPTION_INIT(DUPLICATE_ROLE, -20211); -20212 SYSMAN PACKAGE MGMT_GLOBAL EMAIL_TEST_FAILED 254 PRAGMA EXCEPTION_INIT(EMAIL_TEST_FAILED, -20212); -20213 SYSMAN PACKAGE MGMT_GLOBAL PROGRAM_TEST_FAILED 259 PRAGMA EXCEPTION_INIT(PROGRAM_TEST_FAILED, -20213); -20215 SYSMAN PACKAGE MGMT_GLOBAL SNMP_TEST_FAILED 267 PRAGMA EXCEPTION_INIT(SNMP_TEST_FAILED, -20215); -20216 SYSMAN PACKAGE MGMT_GLOBAL NO_SUCH_METRIC_FOUND 520 PRAGMA EXCEPTION_INIT(NO_SUCH_METRIC_FOUND, -20216); -20217 SYSMAN PACKAGE MGMT_GLOBAL MODIFY_FAILED 271 PRAGMA EXCEPTION_INIT(MODIFY_FAILED, -20217); -20218 SYSMAN PACKAGE MGMT_GLOBAL DROP_FAILED 276 PRAGMA EXCEPTION_INIT(DROP_FAILED, -20218); -20219 SYSMAN PACKAGE MGMT_GLOBAL GRANT_FAILED 281 PRAGMA EXCEPTION_INIT(GRANT_FAILED, -20219); -20220 SYSMAN PACKAGE MGMT_GLOBAL REVOKE_FAILED 286 PRAGMA EXCEPTION_INIT(REVOKE_FAILED, -20220); -20221 SYSMAN PACKAGE MGMT_GLOBAL INSUFFICIENT_PRIVILEGES 291 PRAGMA EXCEPTION_INIT(INSUFFICIENT_PRIVILEGES, -20221); -20222 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PRIVILEGE_TYPE 296 PRAGMA EXCEPTION_INIT(INVALID_PRIVILEGE_TYPE, -20222); -20223 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PRIVILEGE 301 PRAGMA EXCEPTION_INIT(INVALID_PRIVILEGE, -20223); -20224 SYSMAN PACKAGE MGMT_GLOBAL INVALID_TARGET 306 PRAGMA EXCEPTION_INIT(INVALID_TARGET, -20224); -20225 SYSMAN PACKAGE MGMT_GLOBAL PRIV_DOES_NOT_EXIST 311 PRAGMA EXCEPTION_INIT(PRIV_DOES_NOT_EXIST, -20225); -20226 SYSMAN PACKAGE MGMT_GLOBAL CANT_DROP_YOURSELF 316 PRAGMA EXCEPTION_INIT(CANT_DROP_YOURSELF, -20226); -20227 SYSMAN PACKAGE MGMT_GLOBAL ALREADY_EXISTS 321 PRAGMA EXCEPTION_INIT(ALREADY_EXISTS, -20227); -20228 SYSMAN PACKAGE MGMT_GLOBAL CIRCULAR_ROLE 326 PRAGMA EXCEPTION_INIT(CIRCULAR_ROLE, -20228); -20229 SYSMAN PACKAGE MGMT_GLOBAL INVALID_GROUP 331 PRAGMA EXCEPTION_INIT(INVALID_GROUP, -20229); -20230 SYSMAN PACKAGE MGMT_GLOBAL CREATE_FAILED 336 PRAGMA EXCEPTION_INIT(CREATE_FAILED, -20230); -20231 SYSMAN PACKAGE MGMT_GLOBAL USER_EXISTS 341 PRAGMA EXCEPTION_INIT(USER_EXISTS, -20231); -20232 SYSMAN PACKAGE MGMT_GLOBAL ROLE_EXISTS 346 PRAGMA EXCEPTION_INIT(ROLE_EXISTS, -20232); -20233 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PARAMS 352 PRAGMA EXCEPTION_INIT(INVALID_PARAMS, -20233); -20234 SYSMAN PACKAGE MGMT_GLOBAL DUPLICATE_BASELINE_NAME 357 PRAGMA EXCEPTION_INIT(DUPLICATE_BASELINE_NAME, -20234); -20235 SYSMAN PACKAGE MGMT_GLOBAL BASELINE_DOES_NOT_EXIST 363 PRAGMA EXCEPTION_INIT(BASELINE_DOES_NOT_EXIST, -20235); -20236 SYSMAN PACKAGE MGMT_GLOBAL DUPLICATE_DEVICE_NAME 369 PRAGMA EXCEPTION_INIT(DUPLICATE_DEVICE_NAME, -20236); -20237 SYSMAN PACKAGE MGMT_GLOBAL DEVICE_DOES_NOT_EXIST 375 PRAGMA EXCEPTION_INIT(DEVICE_DOES_NOT_EXIST, -20237); -20238 SYSMAN PACKAGE MGMT_GLOBAL TARGET_BEING_DELETED 381 PRAGMA EXCEPTION_INIT(TARGET_BEING_DELETED, -20238); -20239 SYSMAN PACKAGE MGMT_GLOBAL TARGET_BEING_MOVED 387 PRAGMA EXCEPTION_INIT(TARGET_BEING_MOVED, -20239); -20242 SYSMAN PACKAGE MGMT_GLOBAL TARGET_CANNOT_BE_DELETED 401 PRAGMA EXCEPTION_INIT(TARGET_CANNOT_BE_DELETED, -20242); -20247 SYSMAN PACKAGE MGMT_GLOBAL INVALID_EMD_URL 407 PRAGMA EXCEPTION_INIT(INVALID_EMD_URL, -20247); -20248 SYSMAN PACKAGE MGMT_GLOBAL MISSING_EM_KEY 413 PRAGMA EXCEPTION_INIT(MISSING_EM_KEY, -20248); -20249 SYSMAN PACKAGE MGMT_GLOBAL INVALID_EM_KEY 419 PRAGMA EXCEPTION_INIT(INVALID_EM_KEY, -20249); -20300 SYSMAN PACKAGE MGMT_GLOBAL RULE_DOES_NOT_EXIST 425 PRAGMA EXCEPTION_INIT(RULE_DOES_NOT_EXIST, -20300); -20301 SYSMAN PACKAGE MGMT_GLOBAL DUPLICATE_RULE_NAME 431 PRAGMA EXCEPTION_INIT(DUPLICATE_RULE_NAME, -20301); -20302 SYSMAN PACKAGE MGMT_GLOBAL INVALID_RULE_DATA 437 PRAGMA EXCEPTION_INIT(INVALID_RULE_DATA, -20302); -20303 SYSMAN PACKAGE MGMT_GLOBAL INSUFFICIENT_PRIVILEGES 443 -- PRAGMA EXCEPTION_INIT(INSUFFICIENT_PRIVILEGES, -20303); -20400 SYSMAN PACKAGE MGMT_GLOBAL INVALID_JOB_TYPE 533 PRAGMA EXCEPTION_INIT(INVALID_JOB_TYPE, -20400); -20401 SYSMAN PACKAGE MGMT_GLOBAL JOB_EXISTS 538 PRAGMA EXCEPTION_INIT(JOB_EXISTS, -20401); -20402 SYSMAN PACKAGE MGMT_GLOBAL JOB_PARAM_MISSING 543 PRAGMA EXCEPTION_INIT(JOB_PARAM_MISSING, -20402); -20403 SYSMAN PACKAGE MGMT_GLOBAL INVALID_JOB 548 PRAGMA EXCEPTION_INIT(INVALID_JOB, -20403); -20404 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PARAMS_IN_PARAM_SRC 554 PRAGMA EXCEPTION_INIT(INVALID_PARAMS_IN_PARAM_SRC, -20404); -20405 SYSMAN PACKAGE MGMT_GLOBAL SQL_EXECUTION_ERROR 560 PRAGMA EXCEPTION_INIT(SQL_EXECUTION_ERROR, -20405); -20406 SYSMAN PACKAGE MGMT_GLOBAL INVALID_TARGETS_IN_JOB 565 PRAGMA EXCEPTION_INIT(INVALID_TARGETS_IN_JOB, -20406); -20407 SYSMAN PACKAGE MGMT_GLOBAL INCORRECT_VALUES 571 PRAGMA EXCEPTION_INIT(INCORRECT_VALUES, -20407); -20408 SYSMAN PACKAGE MGMT_GLOBAL SUSPEND_FINISHED_JOB 576 PRAGMA EXCEPTION_INIT(SUSPEND_FINISHED_JOB, -20408); -20409 SYSMAN PACKAGE MGMT_GLOBAL RESTART_INVALID_JOB 582 PRAGMA EXCEPTION_INIT(RESTART_INVALID_JOB, -20409); -20410 SYSMAN PACKAGE MGMT_GLOBAL INVALID_SCHEDULE 587 PRAGMA EXCEPTION_INIT(INVALID_SCHEDULE, -20410); -20411 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PARAMETER 592 PRAGMA EXCEPTION_INIT(INVALID_PARAMETER, -20411); -20412 SYSMAN PACKAGE MGMT_GLOBAL INSUFFICIENT_JOB_PRIVS 597 PRAGMA EXCEPTION_INIT(INSUFFICIENT_JOB_PRIVS, -20412); -20413 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PARAMS_IN_SEC 602 PRAGMA EXCEPTION_INIT(INVALID_PARAMS_IN_SEC, -20413); -20414 SYSMAN PACKAGE MGMT_GLOBAL ACTIVE_EXECUTIONS_EXIST 607 PRAGMA EXCEPTION_INIT(ACTIVE_EXECUTIONS_EXIST, -20414); -20415 SYSMAN PACKAGE MGMT_GLOBAL INVALID_EXECUTION 612 PRAGMA EXCEPTION_INIT(INVALID_EXECUTION, -20415); -20416 SYSMAN PACKAGE MGMT_GLOBAL PURGE_POLICY_EXISTS 617 PRAGMA EXCEPTION_INIT(PURGE_POLICY_EXISTS, -20416); -20417 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PURGE_CRITERION 622 PRAGMA EXCEPTION_INIT(INVALID_PURGE_CRITERION, -20417); -20418 SYSMAN PACKAGE MGMT_GLOBAL INVALID_EVENT 628 PRAGMA EXCEPTION_INIT(INVALID_EVENT, -20418); -20419 SYSMAN PACKAGE MGMT_GLOBAL EXEC_LOCK 633 PRAGMA EXCEPTION_INIT(EXEC_LOCK, -20419); -20420 SYSMAN PACKAGE MGMT_GLOBAL INVALID_PARAMS_IN_LOCK 638 PRAGMA EXCEPTION_INIT(INVALID_PARAMS_IN_LOCK, -20420); -20421 SYSMAN PACKAGE MGMT_GLOBAL INVALID_JOB_TYPE 643 PRAGMA EXCEPTION_INIT(INVALID_JOB_TYPE, -20421); -20422 SYSMAN PACKAGE MGMT_GLOBAL JOB_SUSPENDED 648 PRAGMA EXCEPTION_INIT(JOB_SUSPENDED, -20422); -20423 SYSMAN PACKAGE MGMT_GLOBAL RESTART_RESTART_FAILED_JOB 654 PRAGMA EXCEPTION_INIT(RESTART_RESTART_FAILED_JOB, -20423); -20424 SYSMAN PACKAGE MGMT_GLOBAL EDIT_EXPIRED_JOB 659 PRAGMA EXCEPTION_INIT(EDIT_EXPIRED_JOB, -20424); -20425 SYSMAN PACKAGE MGMT_GLOBAL JOB_CREATE_FAILED 664 PRAGMA EXCEPTION_INIT(JOB_CREATE_FAILED, -20425); -20451 SYSMAN PACKAGE MGMT_GLOBAL INVALID_FLATTENING_INPUT 671 PRAGMA EXCEPTION_INIT(INVALID_FLATTENING_INPUT, -20451); -20452 SYSMAN PACKAGE MGMT_GLOBAL ONLY_ONE_TARGET_INPUT 675 PRAGMA EXCEPTION_INIT(ONLY_ONE_TARGET_INPUT, -20452); -20500 SYSMAN PACKAGE MGMT_GLOBAL TARGET_ALREADY_EXISTS 683 PRAGMA EXCEPTION_INIT(TARGET_ALREADY_EXISTS, -20500); -20501 SYSMAN PACKAGE MGMT_GLOBAL DUPLICATE_TARGET 688 PRAGMA EXCEPTION_INIT(DUPLICATE_TARGET, -20501); -20502 SYSMAN PACKAGE MGMT_GLOBAL MULTIPLE_AGENTS_PER_URL 693 PRAGMA EXCEPTION_INIT(MULTIPLE_AGENTS_PER_URL, -20502); -20503 SYSMAN PACKAGE MGMT_GLOBAL ACTION_NOT_SUPP 698 PRAGMA EXCEPTION_INIT(ACTION_NOT_SUPP, -20503); -20600 SYSMAN PACKAGE MGMT_GLOBAL TARGET_DELETION_IN_PROG 715 PRAGMA EXCEPTION_INIT(TARGET_DELETION_IN_PROG, -20600); -20601 SYSMAN PACKAGE MGMT_GLOBAL DUPLICATE_RECORD 727 PRAGMA EXCEPTION_INIT(DUPLICATE_RECORD, -20601); -20602 SYSMAN PACKAGE MGMT_GLOBAL UPDATE_RECORD 737 PRAGMA EXCEPTION_INIT(UPDATE_RECORD, -20602); -20603 SYSMAN PACKAGE MGMT_GLOBAL UPDATE_TZRGN 746 PRAGMA EXCEPTION_INIT(UPDATE_TZRGN, -20603); -20604 SYSMAN PACKAGE MGMT_GLOBAL OVERLAPPING_METRIC_DEF 755 PRAGMA EXCEPTION_INIT(OVERLAPPING_METRIC_DEF, -20604); -20610 SYSMAN PACKAGE MGMT_GLOBAL INVALID_SEVERITY_CODE 767 PRAGMA EXCEPTION_INIT(INVALID_SEVERITY_CODE, -20610); -20611 SYSMAN PACKAGE MGMT_GLOBAL INCONSISTANT_SEVERITY 778 PRAGMA EXCEPTION_INIT(INCONSISTANT_SEVERITY, -20611); -20612 SYSMAN PACKAGE MGMT_GLOBAL INTERNAL_SEVERITY 788 PRAGMA EXCEPTION_INIT(INTERNAL_SEVERITY, -20612); -20613 SYSMAN PACKAGE MGMT_GLOBAL UNKNOWN_TARGET 798 PRAGMA EXCEPTION_INIT(UNKNOWN_TARGET, -20613); -20614 SYSMAN PACKAGE EM_MASTER_AGENT NON_MASTER_AGENT 6 PRAGMA EXCEPTION_INIT(NON_MASTER_AGENT, -20614); -20614 SYSMAN PACKAGE MGMT_GLOBAL NON_MASTER_AGENT 809 PRAGMA EXCEPTION_INIT(NON_MASTER_AGENT, -20614); -20615 SYSMAN PACKAGE MGMT_GLOBAL SEVERITY_IN_BLACKOUT 820 PRAGMA EXCEPTION_INIT(SEVERITY_IN_BLACKOUT, -20615); -20617 SYSMAN PACKAGE MGMT_GLOBAL SERVERITY_OUT_ORDER 830 PRAGMA EXCEPTION_INIT(SERVERITY_OUT_ORDER, -20617); -20618 SYSMAN PACKAGE MGMT_GLOBAL AGENT_DELETION_IN_PROG 838 PRAGMA EXCEPTION_INIT(AGENT_DELETION_IN_PROG, -20618); -20619 SYSMAN PACKAGE MGMT_GLOBAL STALE_TARGET_ADDTION_EXCEPTION 845 PRAGMA EXCEPTION_INIT(STALE_TARGET_ADDTION_EXCEPTION, -20619); -20631 SYSMAN PACKAGE MGMT_GLOBAL INVALID_UNRCH_CLR_VIOL 857 PRAGMA EXCEPTION_INIT(INVALID_UNRCH_CLR_VIOL, -20631); -20700 SYSMAN PACKAGE MGMT_GLOBAL INVALID_BLACKOUT_REASON 868 PRAGMA EXCEPTION_INIT(INVALID_BLACKOUT_REASON, -20700); -20701 SYSMAN PACKAGE MGMT_GLOBAL INVALID_BLACKOUT 873 PRAGMA EXCEPTION_INIT(INVALID_BLACKOUT, -20701); -20702 SYSMAN PACKAGE MGMT_GLOBAL BLACKOUT_STOPPED 879 PRAGMA EXCEPTION_INIT(BLACKOUT_STOPPED, -20702); -20703 SYSMAN PACKAGE MGMT_GLOBAL BLACKOUT_NOT_EXIST 884 PRAGMA EXCEPTION_INIT(BLACKOUT_NOT_EXIST, -20703); -20704 SYSMAN PACKAGE MGMT_GLOBAL BLACKOUT_NOT_STOPPED 890 PRAGMA EXCEPTION_INIT(BLACKOUT_NOT_STOPPED, -20704); -20705 SYSMAN PACKAGE MGMT_GLOBAL BLACKOUT_PENDING_EDIT 896 PRAGMA EXCEPTION_INIT(BLACKOUT_PENDING_EDIT, -20705); -20706 SYSMAN PACKAGE MGMT_GLOBAL BLACKOUT_STOP_PENDING 902 PRAGMA EXCEPTION_INIT(BLACKOUT_STOP_PENDING, -20706); -20707 SYSMAN PACKAGE MGMT_GLOBAL BLACKOUT_STOP_FAILED 906 PRAGMA EXCEPTION_INIT(BLACKOUT_STOP_FAILED, -20707); -20708 SYSMAN PACKAGE MGMT_GLOBAL BLACKOUT_START_PROCESS 910 PRAGMA EXCEPTION_INIT(BLACKOUT_START_PROCESS, -20708); -20709 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_NOT_CREATED_USER 914 PRAGMA EXCEPTION_INIT(BLKOUT_NOT_CREATED_USER, -20709); -20710 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_STARTED_AT_AGENT 918 PRAGMA EXCEPTION_INIT(BLKOUT_STARTED_AT_AGENT, -20710); -20711 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_INVALID_STATE_MOD 922 PRAGMA EXCEPTION_INIT(BLKOUT_INVALID_STATE_MOD, -20711); -20712 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_INVALID_STATE_DEL 926 PRAGMA EXCEPTION_INIT(BLKOUT_INVALID_STATE_DEL, -20712); -20713 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_INVALID_STATE_STOP 930 PRAGMA EXCEPTION_INIT(BLKOUT_INVALID_STATE_STOP, -20713); -20714 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_NO_PRIVS_SEL_TGTS 934 PRAGMA EXCEPTION_INIT(BLKOUT_NO_PRIVS_SEL_TGTS, -20714); -20715 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_NO_PRIVS_HOST_TGTS 938 PRAGMA EXCEPTION_INIT(BLKOUT_NO_PRIVS_HOST_TGTS, -20715); -20716 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_ALREADY_EXISTS 942 PRAGMA EXCEPTION_INIT(BLKOUT_ALREADY_EXISTS, -20716); -20717 SYSMAN PACKAGE MGMT_GLOBAL BLK_INVALID_SCHEDULE 947 PRAGMA EXCEPTION_INIT(BLK_INVALID_SCHEDULE, -20717); -20718 SYSMAN PACKAGE MGMT_GLOBAL BLKOUT_CREATE_FAILED 952 PRAGMA EXCEPTION_INIT(BLKOUT_CREATE_FAILED, -20718); -20800 SYSMAN PACKAGE MGMT_GLOBAL SNAPSHOT_LOCK 960 PRAGMA EXCEPTION_INIT(SNAPSHOT_LOCK, -20800); -20801 SYSMAN PACKAGE MGMT_GLOBAL SNAPSHOT_MISSING 964 PRAGMA EXCEPTION_INIT(SNAPSHOT_MISSING, -20801); -20900 SYSMAN PACKAGE MGMT_GLOBAL INVALID_CRED_SET 973 PRAGMA EXCEPTION_INIT(INVALID_CRED_SET, -20900); -20999 SYSMAN PACKAGE MGMT_JOB_UI_RUNS ASSERTFAIL 32 PRAGMA EXCEPTION_INIT(ASSERTFAIL, -20999); 125 rows selected.125 ORA custom numbers are reserved for original Oracle product.
The End
As a conclusion two things has to be said:- Almost all custom exceptions are in SYSMAN schema, what is good.
- Only one custom exception is in SYS schema and this has to kept in mind if programming any exception in SYS schema (not to advisable but very possible)
- Huge number of custom ORA exceptions in SYSMAN schema tells me that OEM is not original Oracle kernel product but more like "Add on"-whatever marketing people from Oracle try to say about that.
Cheers!
Keep in mind that wrapped source is not covered in this case.
ReplyDelete8(
This comment has been removed by a blog administrator.
ReplyDelete