Pl/sql DEVELOPER 6 Session Management (original)

Source: Internet
Author: User
Tags add object end execution sql query window oracle database
Original
Pl/sql DEVELOPER 6 Session Management







Pl/sql DEVELOPER 6 has excellent session management capabilities, and can perform all common session management functions, including:



Query Session list information



End Session



Session tracking



Exporting session Information



Query specific details for a session



Cursors currently open for the session



SQL that the session is currently executing



All statistics for the session



The object currently locked by the session



You can also customize query-related information based on your personal requirements.







Here's a full description of Pl/sql DEVELOPER 6 Session management features:



Open the Tools/sessions menu and the session window appears as follows:



The Middle primary area displays a list of user session information for the current Oracle database



The bottom display is the select session of the query to cease









User session Information list comparison of commonly used field information description



Username: Oracle user name for session logon



SID: Session SID number



Status: Session state (active: active; INACTIVE: inactive; KILL: End;)



Osuser: Machine Operating system user name for session logon



Machine: Machine name for session logon



Program: Procedure name for session logon



Module: Session-registered modules name



Action: Session-registered activity name



Logon time: Session logon Hours



Process: Session number in the operating system







Session Management Toolbar Description







Each tool corresponds in order



L Refresh



L Automatic Refresh (let the current session window automatically refresh every few seconds)



L End Session (ends the currently selected session, equivalent to command alter system kill sessions)



L Start Tracing (debug tracking starts for the currently selected session)



Equivalent to the execution process sys.dbms_system.set_sql_trace_in_session



Note: For this feature, the currently logged-on user must have Sys.dbms_system execution privileges



You can empower by using the following statement. Grant execute on Dbms_system to YourUserName;



L End Trace (end debug trace for currently selected session)



L Custom session queries (for customizing session query information, with strong extension capabilities)







Session Query Information Description











Note: The following red mark for my custom query or is to modify the place.



L Cursors: Returns the cursor opened by the current selection session



The corresponding SQL statement:



SELECT * from v$open_cursor where sid =: Sid



L SQL Text: Returns the SQL that the current selection session is executing



The corresponding SQL statement:



Select Sql_text from V$sqltext_with_newlines



where address = Hextoraw (: sql_address)



and Hash_value =: sql_hash_value



ORDER BY piece



L Statics: Returns the database statistics for the current selection session



The corresponding SQL statement:



Select Names.name, stats.statistic#, Stats.value



From V$sesstat stats, v$statname names



where Stats.sid =: Sid



and names. statistic# = stats. statistic#



Order BY stats. Value desc



L Locks (optimized for SQL statements): Returns the object locked by the current selection session



The corresponding SQL statement:



SELECT * from sys.all_objects a,v$locked_object b where a.object_id=b.object_id and B.session_id=:sid



L Wait (personal custom query): Returns the waiting information for the current selection session



The corresponding SQL statement:



SELECT * FROM v$session_wait where sid=:sid



L Event (Personal custom query): Returns the events information for the current selection session



The corresponding SQL statement:



SELECT * FROM V$session_event



where SID =: Sid ORDER BY total_waits DESC



Advanced Features: Customizing session Queries











Can be added to the session monitoring information, the wait and event information in this article is I through the custom session query added, add a new item will be in the session window automatically add a tab, caption for the tab label, query for return monitoring information, Query statements can use all fields in the V$session view as bound variables, such as: Sid,:username, sql_address, and so on.



2005-03-17



Ye Zhengxing




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.