Oracle LOCAL=NO Script
LOCAL=NO processes are remote dedicated server processes. There are a couple of times when it is important for me get a little more detail about these processes. One of those times is during an instance shutdown. When trying to shutdown an instance, it is possible for a LOCAL=NO process to cause the shutdown to hang. At this point you can ask the user get out of the offending application or kill their process.
One thing I occasionally do is monitor the top processes on a server. If over time I see that a process is consistently the top process, I investigate it to see whether the source query can be tuned. This has been the case most of the time.
These scenarios caused me to write a BASH script to gather information about LOCAL=NO processes. This script runs on the Linux (and maybe Unix) operating system. There are 3 ways to run the script:
- local_no.sh -a
- This prints information for all LOCAL=NO processes for a given ORACLE_SID.
- local_no.sh -t #
- This prints the top # of LOCAL=NO processes for a given ORACLE_SID. It uses top so the top SPIDS are based on CPU utilization. # represents a number. For example if I use 3 I would see information for the top 3 LOCAL=NO processes.
- local_no.sh “SPID1 SPID2 etc.”
- This prints information for LOCAL=NO processes that are passed in quotes. Also for a given ORACLE_SID.
You must set the ORACLE_SID and ORACLE_HOME environment variables before running this script.