OERR ORA ERROR TOOL INFORMATION ORAUS.MSB FILE

OERR utility is an error diagnose tool for oracle ora errors which gives us three information.They are,

  • Error description
  • Cause of error
  • Action to be taken
[root@exdbadm01 oracle]# type oerr
oerr is hashed (/u01/app/11.2.0/bin/oerr)

If you find any errors in alertlog file or trace file with ora- error code, then instead of searching the google for solution, invoke oerr with ora error code to take time and slowly understand the cause of the error.

[root@exdbadm01 oracle]# oerr ora 00060
00060, 00000, "deadlock detected while waiting for resource"
// *Cause:  Transactions deadlocked one another while waiting for resources.
// *Action: Look at the trace file to see the transactions and resources
//          involved. Retry if necessary.

Strace the oerr utility to check the files to which the utility access. You can see that oerr utility accesses oraus.msg file to get the ora error information which is invoked

[root@exdbadm01 oracle]# strace oerr ora 00060
execve("/u01/app/11.2.0/bin/oerr", ["oerr", "ora", "00060"], [/* 36 vars */]) = 0
brk(0)                                  = 0x58db000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af782053000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2af782054000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/u01/app/11.2.0/lib/tls/x86_64/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/u01/app/11.2.0/lib/tls/x86_64", 0x7fff58fef6a0) = -1 ENOENT (No such file or directory)
open("/u01/app/11.2.0/lib/tls/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/u01/app/11.2.0/lib/tls", 0x7fff58fef6a0) = -1 ENOENT (No such file or directory)
open("/u01/app/11.2.0/lib/x86_64/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/u01/app/11.2.0/lib/x86_64", 0x7fff58fef6a0) = -1 ENOENT (No such file or directory)
open("/u01/app/11.2.0/lib/libtermcap.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/u01/app/11.2.0/lib", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0

....
....
getuid()                                = 0
getgid()                                = 0
access("/u01/app/11.2.0/rdbms/mesg/oraus.msg", R_OK) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat(".", {st_mode=S_IFDIR|0777, st_size=20480, ...}) = 0
stat("/usr/kerberos/sbin/awk", 0x7fff58ff0cd0) = -1 ENOENT (No such file or directory)
stat("/u01/app/11.2.0/bin/awk", 0x7fff58ff0cd0) = -1 ENOENT (No such file or directory)
stat("/usr/sbin/awk", 0x7fff58ff0cd0)   = -1 ENOENT (No such file or directory)
stat("/usr/kerberos/bin/awk", 0x7fff58ff0cd0) = -1 ENOENT (No such file or directory)
stat("/usr/local/bin/awk", 0x7fff58ff0cd0) = -1 ENOENT (No such file or directory)
stat("/bin/awk", {st_mode=S_IFREG|0755, st_size=338744, ...}) = 0
access("/bin/awk", X_OK)                = 0
access("/bin/awk", R_OK)                = 0
stat("/bin/awk", {st_mode=S_IFREG|0755, st_size=338744, ...}) = 0
access("/bin/awk", X_OK)                = 0
access("/bin/awk", R_OK)                = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [INT CHLD], 8) = 0
rt_sigprocmask(SIG_SETMASK, [INT CHLD], NULL, 8) = 0
lseek(255, -8, SEEK_CUR)                = 2559
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2af782073010) = 24046
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x436f50, [], SA_RESTORER, 0x353da30030}, {SIG_DFL, [], SA_RESTORER, 0x353da30030}, 8) = 0
wait4(-1, 00060, 00000, "deadlock detected while waiting for resource"
// *Cause:  Transactions deadlocked one another while waiting for resources.
// *Action: Look at the trace file to see the transactions and resources
//          involved. Retry if necessary.
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 24046
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
wait4(-1, 0x7fff58ff09a4, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn(0xffffffffffffffff)        = 0
rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x353da30030}, {0x436f50, [], SA_RESTORER, 0x353da30030}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
read(255, "\nexit 0\n", 2567)           = 8
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(0)                           = ?

Lets find the oraus.msg file

[root@exdbadm01 oracle]# locate oraus
/data/grid/stage/ext/bin/rdbms/mesg/oraus.msb
/data/oracle/product/11.2.0/db/rdbms/mesg/oraus.msb
/data/oracle/product/11.2.0/db/rdbms/mesg/oraus.msg
/u01/app/11.2.0/inventory/Scripts/ext/bin/rdbms/mesg/oraus.msb
/u01/app/11.2.0/inventory/backup/2021-04-03_01-21-04PM/Scripts/ext/bin/rdbms/mesg/oraus.msb
/u01/app/11.2.0/inventory/backup/2021-04-03_12-27-06PM/Scripts/ext/bin/rdbms/mesg/oraus.msb
/u01/app/11.2.0/rdbms/mesg/oraus.msb
/u01/app/11.2.0/rdbms/mesg/oraus.msg

Lets explore the oraus.msg file to get further information of the error codes inside. This file acts like a dictionary file to refer the ora error. If you remove this file from the oracle home, then you will not get any error results

[root@exdbadm01 oracle]# vi /data/oracle/product/11.2.0/db/rdbms/mesg/oraus.msg

We also have alphanumeric binary file which has random data inside with the same filename with extension .msb. I am not sure what that file does! The information in MSB files can be accessed using the Oracle Call Interface (OCI), and an API is used for accessing Oracle functions.

[root@exdbadm01 oracle]# strings /data/oracle/product/11.2.0/db/rdbms/mesg/oraus.msb > oraerror

Look into the oerr executable file to get an understanding of how the script really access the oraus file

[root@exdbadm01 oracle]# vi /u01/app/11.2.0/bin/oerr

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s