早上网管反映firewall检测到Oracle Server流量异常:
2.根据上图source port:11520定位到spid是9434
[oracle@SalaryDB ~]$ netstat -ntp | grep 172.19.1.7
3.透过spid定位sql_id及wait event,看到event: SQL*Net to dblink大概知道問題所在了
select sid,machine,osuser,sql_id,prev_sql_id,event,seconds_in_wait,state from v$session where paddr in (select addr from v$process where spid=9434)
4.定位sql,发现是一个view
select sql_text from v$sqlarea where sql_id in('2kaanw7tqdwvy')
SELECT FACT_NO, BRANCH_NO, PNL_NO, PNL_NM, SEX, CARD_NO, HIRE_DT, RESIGN_DT, POSITION_NO FROM PCIADMIN.V_PNL_ADIDAS
5.获取view 定义,果然使用到dblink
SELECT dbms_metadata.get_ddl('VIEW','V_PNL_ADIDAS','PCI_ADMIN') FROM DUAL
6.剩下就是与前端开发讨论改善事宜,结果前端说他们将改用webservice,因为webservice走专线,不会影响internet流量