In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
There are three ways to view the session ID of the current session:
1. V$mystat view
SQL > select sid from v$mystat where rownum=1
SID
-
1152
two。 Get it directly using userenv ('sid')
This method can only be used after oracle 10g.
SQL > select userenv ('sid') from dual
Pid,sid looks for each other:
V$session_wait
V$session
V$sqltext
V$process
/ pid finds sid/ (if the process cannot find it, it is not an oracle process) /
/ sid found pid/ (possibly caused by something else)
Supplement 1:
Find the sql statement according to pid
SELECT
Sql_text,hash_value
FROM v$sqltext a
WHERE (a.hash_value, a.address) IN (
SELECT DECODE (sql_hash_value
0, prev_hash_value
Sql_hash_value
),
DECODE (sql_hash_value, 0, prev_sql_addr, sql_address)
FROM v$session b
WHERE b.paddr = (SELECT addr
FROM v$process c
WHERE c.spid ='& pid'))
ORDER BY piece ASC
Supplement 2:
According to pid, find the sid,serial#, and delete it.
Select sid,serial# FROM v$session b
WHERE b.paddr = (SELECT addr
FROM v$process c
WHERE c.spid ='& pid')
ORDER BY piece ASC
Description: the spid- of v$process here is the pid of top.
Supplement 3:
Find PID= according to sid,serial#,.
Select c.spid from v$process c where c.addr = (select b.paddr from v$session b where b.sid=''and b.serialkeeper ='')
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.