Oracle process session, cursor, and transaction relationship

Source: Internet
Author: User

Oracle process session, cursor, and transaction relationship

If you use top in Linux, you can see the running Oracle process. In addition to background processes, Oracle also has user processes.
Both parallel and separate processes are enabled.

Multiple query windows in PL/SQL developer are actually processes.

A process can contain multiple sessions when they can only be run serially. For example, three select queries are executed in a query window.

The following statements show that all processes and session IDs are in the same process.
Select a. spid, A. PID, B. Sid, B. username, status, process, machine, B. Terminal, type, SQL _id
From v $ process a, V $ session B
Where background is null
And a. ADDR = B. paddr
And B. Username <> 'sysmance'
And B. Username <> 'sys'
And B. Terminal = 'pc-200904171104'
Order by B. terminal;
-- 13084 70 69 3608: 3612

Transaction concept: set to maintain data consistency.
Transactions are generated only when the table structure and data are changed.
DML, DDL.
The transaction commit statement is commit;

A session can have multiple transactions. For example, in a stored procedure. Of course, it is also serialized.

Open_cursors parameter cursor

To process SQL statements, Oracle allocates a region called context area to process the required information, including the number of rows to be processed, A pointer pointing to the expression form after the statement is analyzed and the query result set. cursor Is a handle or pointer pointing to the context area. Through it, PL/SQL can process data in the area.

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.