Oracle connections are common for processes with Local=no parameters or with Local=yes.
Local=no: Not a local connection, that is, a network connection. It is connected to the server through listener. The client's application listens to the server through the listener to send the request, after the server listens receives, in with the database connection, carries on the related operation, returns the result to the client. This is through the listening process. So the client needs to configure listening, that is, configure Tnsnames.ora.
Local=yes: Local connection. Local connection does not go to listen, so in the case of service monitoring is not started, through the local sqlplus can still connect to the database.
[Oracle@localhost ~]$ Ps-aux | Less
USER PID%cpu%mem VSZ RSS TTY STAT START time COMMAND
Oracle 469 0.0 0.4 10759972 320408? Ss May28 0:05 ORACLEORCL (local=no)
Oracle 495 1.2 10.1 10762344 7505684? Rs May28 356:58 ORACLEORCL (local=no)
Oracle 863 1.1 10.0 10762344 7455964? Ss May28 330:21 ORACLEORCL (local=no)
If the application uses persistent connections, such as connection pooling, these processes should survive longer.
However, the Local=no process also has the phenomenon that when the client crashes (for example, Plsql Dev or toad dead), we can only end the program, but Oracle does not automatically release the monitoring process between them. Related processes that are not released or continue to occupy system resources. So for these already useless processes, we can kill them.
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/
The following script is the process of killing a network connection that has more than 3 days of connection time. Put the script in the crontab and execute it regularly. But in the production environment with caution!
Kill.sh:
#!/bin/sh
PS-E-o pid-o etime-o args|grep oracle|grep local=no|grep->/tmp/tmpfile
#ps-e-o pid-o etime-o args|grep oracle|grep local=no|grep-|awk ' {print $} ' |awk-f: ' {print $} '
Cat/tmp/tmpfile|while Read Line
Todo
Time= ' echo $LINE |awk ' {print $} '
Time= ' echo $TIME |awk-f-' {print $} '
If [$TIME-GT 3]
Then
echo $LINE |awk ' {print $} ' |xargs-t-n1 kill-9
Fi
Done
Rm-f/tmp/tmpfile
This article is from "Richard's notes-accumulate micro Cheng" blog, please be sure to keep this source http://zxf261.blog.51cto.com/701797/756318