This quick process identifies the Oracle user and session ID of a UNIX process that is using up a large amount...
of CPU. It can also be used to help find inefficient queries. This query is placed inside of a script that I pass the UNIX process ID to.
select s.sid, s.username, s.osuser, s.serial# from v$session s, v$process p where s.paddr = p.addr and p.spid = &1;
NOTE: the &1 is the unix process id that I want to identify.
For More Information
- What do you think about this tip? E-mail the Editor at [email protected] with your feedback.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle tip to offer your fellow DBA's and developers? The best tips submitted will receive a cool prize--submit your tip today!
- Ask your technical Oracle questions--or help out your peers by answering them--in our live discussion forums.
- Check out our Ask the Experts feature: Our SQL, database design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.