标题: 'SQL*Net message from dblink' Waits On ALTER SESSION Commands [打印本页] 作者: 刘泽宇 时间: 2024-5-26 13:06 标题: 'SQL*Net message from dblink' Waits On ALTER SESSION Commands 现象:
Noticed a high number of ALTER SESSION commands, especially when modifying NLS parameters, waiting on either "SQL*Net message from dblink" or "SQL*Net message to dblink"
For example, when tracing the session (10046 SQL trace), the tkprof output displays several sections like this:
Misses in library cache during parse: 0
Parsing user id: 263 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to dblink 135 0.00 0.00
SQL*Net message from dblink 135 0.51 6.82
Misses in library cache during parse: 0
Parsing user id: 263 (recursive depth: 1)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to dblink 99 0.00 0.00
SQL*Net message from dblink 99 1.08 5.08
etc...
原因:
There is an open database link within the current user session.
Every ALTER SESSION executed locally will be executed at remote site as well if dblink is being used and has not been closed.
处理方法:
Explicit close the database link. You can close an open dblink in two different ways,