The Bequeath Protocol is a SQL*Net protocol which enables local clients to connect to a database without using the network listener. Oracle’s Bequeath protocol internally spawns a server process for each client application. It does the same operation that a remote network listener does for the connection locally.
It has the following characteristics:
- Does not use a network listener. Therefore, listener configuration is not required.
- Automatically spawns a dedicated server.
- Is used for local connections (when client and server programs reside on the same system) where an Oracle Database client application, such as SQL*Plus, communicates with an Oracle Database instance running on the same computer.
- Only works in the Dedicated Server mode. It cannot be used in the Shared Server mode.
If you were like me, you might have read the above information before but never thought what it is really about until one day when you stare at your screen and wonder what the process running with protocol beq is on my server?
Yesterday I needed to remount a NFS share which is used for Oracle Database backup. When I tried to umount it, I got the device busy message. I know there is no backup running, and flashback is on turned on for this datatabase. (Note if flashback is on and FRA is on a NAS share, when FRA is not available, Oracle will be brought down).
To find out which process was still using this NFS share, I used fuser (this system doesn’t have lsof installed)
[root@joetest ~]# fuser -m /backup
/backup: 24133
[root@joetest ~]# ps -ef|grep 24133
root 21372 18632 0 16:54 pts/0 00:00:00 grep 24133
oracle 24133 1 0 Nov05 ? 00:10:27 oracleAPROD (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
Here the option “-m” or “-c” is needed when finding processes using a NAS share if we don’t know which files are being used on this NAS share. And “-u” (append user name) and “-v” (verbose mode) can be used for more information.
Looking at the process with PID 24133, it was an Oracle process running with the protocol “beq”. “What is it? Is it safe to kill it?” Two questions just poped into my head. From the output of “ps -ef”, “DESCRIPTION=(LOCAL=YES)” indicated somthing connected to the database locally. I searched processes running with “beq” on the system and saw they were from SQL*Plus.
So apparently a SQL*PLus session started on Nov. 5th and somehow the client has gone, but left a zombie server side process. That’s why I saw the parent process ID with “1” for it. It was safe to kill it. After I killed the zombie process, I was able to remount the NFS share.
If the client was still running, then I would need to query v$process, v$session, v$sql to determine if it is safe to kill a SQL*Plus session.
Great.. Thanks for wonderful information
LikeLike