In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to find the executing statements and kill drop in the database, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
-- query the sql statement being executed by Oracle and the user who executed the statement
[sql] view plain copy
SELECT b.sid oracleID
B.username login Oracle user name
B.serial#
Spid operating system ID
Paddr
SQL being executed by sql_text
B.machine computer name
FROM v$process a, v$session b, v$sqlarea c
WHERE a.addr = b.paddr
AND b.sql_hash_value = c.hash_value
-- View the distribution procedure of the initiator who is executing the sql
[sql] view plain copy
Login identity of SELECT OSUSER computer
The program that PROGRAM initiates the request
User name of the USERNAME login system
SCHEMANAME
B.Cpu_Time spent the time of cpu
STATUS
Sql executed by B.SQL_TEXT
FROM V$SESSION A
LEFT JOIN V$SQL B ON A.SQL_ADDRESS = B.ADDRESS
AND A.SQL_HASH_VALUE = B.HASH_VALUE
ORDER BY b.cpu_time DESC
-- find out the current locked object of oracle
[sql] view plain copy
SELECT l.session_id sid
S.serial#
L.locked_mode lock mode
L.oracle_username login user
L.os_user_name login machine user name
S.machine machine name
S.terminal terminal user name
O.object_name locked object name
S.logon_time login time to the database
FROM v$locked_object l, all_objects o, v$session s
WHERE l.object_id = o.object_id
AND l.session_id = s.sid
ORDER BY sid, s.serial#
-- kill drops the current lock object can be
Alter system kill session 'sid, s. Serializations'
The above is all the contents of the article "how to find the executing statement and kill drop in the database". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.