Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to understand v $ TERM v $ TERM conversation
How to understand v $ TERM v $ TERM conversation
In this view, there is a record for each session connected to the database instance. Including user sessions and background processes such as DBWR, LGWR, arcchiver, etc.

Common columns in V$SESSION

V$SESSION is a basic information view, which is used to find the user SID or SADDR. However, it also has some dynamically changing columns that can be used to check users. For example:

Field description:

Field1:sarrd: raw (4): sessionaddress, the address of the session.

Field 2: sid: raw (4): session identifier, session identifier.

Field 3: Serial Number: Number:

Session serial number, session serial number. An object that uniquely identifies the session. If one session ends and another session starts with the same session ID, the session-level command is guaranteed to be applied to the correct session object.

If a SID is used by other sessions, the value will be automatically increased (when one session ends, another session starts and uses the same SID).

Field 4: audsid: Number: Audit Session id

Check the uniqueness of the session ID to make sure that it is also commonly used when looking for parallel query patterns.

Field 5: parrd: raw (4): Address of the process that owns the session.

The address of the process owned by this session.

Field 6: UserNo.:No.: Oracle User ID

Identifier of the Oracle user.

Field 7: User name: varchar2 (30): oracleusername, the user name of Oracle.

Field 8: Command: Number:

Command in progress (the last statement has been analyzed); See Table 3-7 for a list of values.

Numerical value of sql corresponding to this session command: 0 by default.

Field 8: Owner id: Number

If the value is 2 147483644, the column content is invalid. Otherwise, this column contains the identifier of the user who owns the migratable session.

For operations using parallel slaves, this value is interpreted as a 4-byte value. The lower 2 bytes represent the session number, and the upper byte represents the instance ID of the query coordinator.

Field 9: taddr: varchar2 (8): Address of the transaction state object.

The address of the transaction state object.

Field 10: lock wait: Varchar2 (8)

The address of the waiting lock; If not, it is empty.

The address where the lock is waiting. If it is empty, there is no waiting.

Field 1 1: Status: varchar2 (8)

Status of the session: active (currently executing SQL), inactive, terminated (marked as terminated), cached (temporarily cached for Oracle*XA), cut (session active, waiting for the client).

This column is used to determine whether the session status is:

Active: active, execute SQL statements.

Inactive: inactive state

Deleted: Mark as deleted.

Cache: Use of Temporary Buffer in Oracle

SNIPED: Session is inactive, waiting for client operation.

Field 12: Server: varchar2 (9)

Server Type: Private, Shared, Pseudo, None

Use the type of connection database server.

Dedicated: dedicated server

Share: * * * * * Enjoy the server.

Pseudo:

None:

Field 13: ModeNo.:No.:

Pattern user identifier

The numerical value corresponding to the mode user identifier.

Field14: schemaname: varchar2 (30):

Schema user name

User name of the pattern.

Field15: Osuser: varchar2 (15)

Operating system client user name

The user name of the client operating system.

Field 16: Process

VARCHAR2(9)

Operating system client process ID

The process ID (identifier) of the client operating system.

Field 17: Machine

VARCHAR2(64)

Operating system machine name

The machine name of the client operating system connected to the database.

Field 18: Terminal

VARCHAR2( 10)

Operating system terminal name

The terminal name of the client operating system connected to the database.

Field 19: Program

VARCHAR2(48)

Operating system program name

The process name of the client operating system connected to the database.

Field 20: Type

VARCHAR2( 10)

Session type

Session type

Field 2 1: SQL _ address

Primitive (4)

Used with SQL_HASH_VALUE to identify the currently executing SQL statement.

The SQL_HASH_VALUE value of the currently executed SQL statement.

Field 22: SQL Hash Value

figure

Used with SQL_ADDRESS to identify the currently executing SQL statement.

The SQL_ADDRESS value of the currently executing SQL statement.

SQL_HASH_VALUE, SQL_ADDRESS: These two columns are used to identify the SQL statement executed by the session by default. If it is null or 0, it means that the session has not executed any SQL statements. PREV_HASH_VALUE and PREV_ADDRESS are used to identify the last statement executed by the session.

Field 23: SQL _ ID

VARCHAR2( 13)

Identifier of the currently executing SQL statement.

Identifier of the SQL statement being executed.

Field 24: SQL _ child _ number

figure

Subnumber of the SQL statement currently being executed.

Field 25: Previous SQL Address

Primitive (4)

Used with prev _ HASH _ value to identify the last executed SQL statement.

Field 26: Previous Hash Value

figure

Used with SQL _ HASH _ value to identify the last executed SQL statement.

Field 27: Previous SQL id

Varchar2( 13)

The SQL identifier of the last executed SQL statement.