【转】V$SESSION

来源:互联网 发布:c语言计算马德隆常数 编辑:程序博客网 时间:2024/05/17 09:11

This view lists session information for each current session.

 

ColumnDatatypeDescriptionSADDRRAW(4 | 8)Session addressSIDNUMBERSession identifierSERIAL#NUMBERSession serial number. Used to uniquely identify a session's objects. Guarantees that session-level commands are applied to the correct session objects if the session ends and another session begins with the same session ID.AUDSIDNUMBERAuditing session IDPADDRRAW(4 | 8)Address of the process that owns the sessionUSER#NUMBEROracle user identifierUSERNAMEVARCHAR2(30)Oracle usernameCOMMANDNUMBERCommand in progress (last statement parsed); for a list of values, see Table 7-5. These values also appear in the AUDIT_ACTIONS table.OWNERIDNUMBERThe column contents are invalid if the value is 2147483644. Otherwise, this column contains the identifier of the user who owns the migratable session.

For operations using Parallel Slaves, interpret this value as a 4-byte value. The low-order 2 bytes of which represent the session number, and the high-order bytes the instance ID of the query coordinator.

TADDRVARCHAR2(8)Address of transaction state objectLOCKWAITVARCHAR2(8)Address of lock waiting for; null if noneSTATUSVARCHAR2(8)Status of the session:
  • ACTIVE - Session currently executing SQL

  • INACTIVE

  • KILLED - Session marked to be killed

  • CACHED - Session temporarily cached for use by Oracle*XA

  • SNIPED - Session inactive, waiting on the client

SERVERVARCHAR2(9)Server type (DEDICATED| SHARED| PSEUDO| NONE)SCHEMA#NUMBERSchema user identifierSCHEMANAMEVARCHAR2(30)Schema user nameOSUSERVARCHAR2(30)Operating system client user namePROCESSVARCHAR2(12)Operating system client process IDMACHINEVARCHAR2(64)Operating system machine nameTERMINALVARCHAR2(30)Operating system terminal namePROGRAMVARCHAR2(48)Operating system program nameTYPEVARCHAR2(10)Session typeSQL_ADDRESSRAW(4 | 8)Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executedSQL_HASH_VALUENUMBERUsed with SQL_ADDRESS to identify the SQL statement that is currently being executedSQL_IDVARCHAR2(13)SQL identifier of the SQL statement that is currently being executedSQL_CHILD_NUMBERNUMBERChild number of the SQL statement that is currently being executedPREV_SQL_ADDRRAW(4 | 8)Used with PREV_HASH_VALUE to identify the last SQL statement executedPREV_HASH_VALUENUMBERUsed with SQL_HASH_VALUE to identify the last SQL statement executedPREV_SQL_IDVARCHAR2(13)SQL identifier of the last SQL statement executedPREV_CHILD_NUMBERNUMBERChild number of the last SQL statement executedMODULEVARCHAR2(48)Name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedureMODULE_HASHNUMBERHash value of the above MODULEACTIONVARCHAR2(32)Name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedureACTION_HASHNUMBERHash value of the above action nameCLIENT_INFOVARCHAR2(64)Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedureFIXED_TABLE_SEQUENCENUMBERThis contains a number that increases every time the session completes a call to the database and there has been an intervening select from a dynamic performance table. This column can be used by performance monitors to monitor statistics in the database. Each time the performance monitor looks at the database, it only needs to look at sessions that are currently active or have a higher value in this column than the highest value that the performance monitor saw the last time. All the other sessions have been idle since the last time the performance monitor looked at the database.ROW_WAIT_OBJ#NUMBERObject ID for the table containing the row specified in ROW_WAIT_ROW#ROW_WAIT_FILE#NUMBERIdentifier for the datafile containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.ROW_WAIT_BLOCK#NUMBERIdentifier for the block containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.ROW_WAIT_ROW#NUMBERCurrent row being locked. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.LOGON_TIMEDATETime of logonLAST_CALL_ETNUMBERIf the session STATUS is currently ACTIVE, then the value represents the elapsed time in seconds since the session has become active.

If the session STATUS is currently INACTIVE, then the value represents the elapsed time in seconds since the session has become inactive.

PDML_ENABLEDVARCHAR2(3)This column has been replaced by column PDML_STATUSFAILOVER_TYPEVARCHAR2(13)Indicates whether and to what extent transparent application failover (TAF) is enabled for the session:
  • NONE - Failover is disabled for this session

  • SESSION - Client is able to fail over its session following a disconnect

  • SELECT - Client is able to fail over queries in progress as well

See Also:

  • Oracle Database Concepts for more information on TAF

  • Oracle Database Net Services Administrator's Guide for information on configuring TAF

FAILOVER_METHODVARCHAR2(10)Indicates the transparent application failover method for the session:
  • NONE - Failover is disabled for this session

  • BASIC - Client itself reconnects following a disconnect

  • PRECONNECT - Backup instance can support all connections from every instance for which it is backed up

FAILED_OVERVARCHAR2(3)Indicates whether the session is running in failover mode and failover has occurred (YES) or not (NO)RESOURCE_CONSUMER_GROUPVARCHAR2(32)Name of the session's current resource consumer groupPDML_STATUSVARCHAR2(8)If ENABLED, the session is in a PARALLEL DML enabled mode. If DISABLED, PARALLEL DML enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DML.PDDL_STATUSVARCHAR2(8)If ENABLED, the session is in a PARALLEL DDL enabled mode. If DISABLED, PARALLEL DDL enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DDL.PQ_STATUSVARCHAR2(8)If ENABLED, the session is in a PARALLEL QUERY enabled mode. If DISABLED, PARALLEL QUERY enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL QUERY.CURRENT_QUEUE_DURATIONNUMBERIf queued (1), the current amount of time the session has been queued. If not currently queued, the value is 0.CLIENT_IDENTIFIERVARCHAR2(64)Client identifier of the sessionBLOCKING_SESSION_STATUSVARCHAR2(11)Blocking session status:
  • VALID

  • NO HOLDER

  • GLOBAL

  • NOT IN WAIT

  • UNKNOWN

BLOCKING_INSTANCENUMBERInstance identifier of blocking sessionBLOCKING_SESSIONNUMBERSession identifier of blocking sessionSEQ#NUMBERSequence number that uniquely identifies the wait. Incremented for each wait.EVENT#NUMBEREvent numberEVENTVARCHAR2(64)Resource or event for which the session is waiting

See Also: Appendix C, "Oracle Wait Events"

P1TEXTVARCHAR2(64)Description of the first additional parameterP1NUMBERFirst additional parameterP1RAWRAW(4)First additional parameterP2TEXTVARCHAR2(64)Description of the second additional parameterP2NUMBERSecond additional parameterP2RAWRAW(4)Second additional parameterP3TEXTVARCHAR2(64)Description of the third additional parameterP3NUMBERThird additional parameterP3RAWRAW(4)Third additional parameterWAIT_CLASS_IDNUMBERIdentifier of the wait classWAIT_CLASS#NUMBERNumber of the wait classWAIT_CLASSVARCHAR2(64)Name of the wait classWAIT_TIMENUMBERA nonzero value is the session's last wait time. A zero value means the session is currently waiting.SECONDS_IN_WAITNUMBERIf WAIT_TIME = 0, then SECONDS_IN_WAIT is the seconds spent in the current wait condition. If WAIT_TIME > 0, then SECONDS_IN_WAIT is the seconds since the start of the last wait, and SECONDS_IN_WAIT - WAIT_TIME / 100 is the active seconds since the last wait ended.STATEVARCHAR2(19)Wait state:
  • 0 - WAITING (the session is currently waiting)

  • -2 - WAITED UNKNOWN TIME (duration of last wait is unknown)

  • -1 - WAITED SHORT TIME (last wait <1/100th of a second)

  • >0 - WAITED KNOWN TIME (WAIT_TIME = duration of last wait)

SERVICE_NAMEVARCHAR2(64)Service name of the sessionSQL_TRACEVARCHAR2(8)Indicates whether SQL tracing is enabled (ENABLED) or disabled (DISABLED)SQL_TRACE_WAITSVARCHAR2(5)Indicates whether wait tracing is enabled (TRUE) or not (FALSE)SQL_TRACE_BINDSVARCHAR2(5)Indicates whether bind tracing is enabled (TRUE) or not (FALSE)

Table 7-5 COMMAND Column of V$SESSION and Corresponding Commands

 

NumberCommandNumberCommand

1

CREATE TABLE

2

INSERT

3

SELECT

4

CREATE CLUSTER

5

ALTER CLUSTER

6

UPDATE

7

DELETE

8

DROP CLUSTER

9

CREATE INDEX

10

DROP INDEX

11

ALTER INDEX

12

DROP TABLE

13

CREATE SEQUENCE

14

ALTER SEQUENCE

15

ALTER TABLE

16

DROP SEQUENCE

17

GRANT OBJECT

18

REVOKE OBJECT

19

CREATE SYNONYM

20

DROP SYNONYM

21

CREATE VIEW

22

DROP VIEW

23

VALIDATE INDEX

24

CREATE PROCEDURE

25

ALTER PROCEDURE

26

LOCK

27

NO-OP

28

RENAME

29

COMMENT

30

AUDIT OBJECT

31

NOAUDIT OBJECT

32

CREATE DATABASE LINK

33

DROP DATABASE LINK

34

CREATE DATABASE

35

ALTER DATABASE

36

CREATE ROLLBACK SEG

37

ALTER ROLLBACK SEG

38

DROP ROLLBACK SEG

39

CREATE TABLESPACE

40

ALTER TABLESPACE

41

DROP TABLESPACE

42

ALTER SESSION

43

ALTER USER

44

COMMIT

45

ROLLBACK

46

SAVEPOINT

47

PL/SQL EXECUTE

48

SET TRANSACTION

49

ALTER SYSTEM

50

EXPLAIN

51

CREATE USER

52

CREATE ROLE

53

DROP USER

54

DROP ROLE

55

SET ROLE

56

CREATE SCHEMA

57

CREATE CONTROL FILE

59

CREATE TRIGGER

60

ALTER TRIGGER

61

DROP TRIGGER

62

ANALYZE TABLE

63

ANALYZE INDEX

64

ANALYZE CLUSTER

65

CREATE PROFILE

66

DROP PROFILE

67

ALTER PROFILE

68

DROP PROCEDURE

70

ALTER RESOURCE COST

71

CREATE MATERIALIZED VIEW LOG

72

ALTER MATERIALIZED VIEW LOG

73

DROP MATERIALIZED VIEW LOG

74

CREATE MATERIALIZED VIEW

75

ALTER MATERIALIZED VIEW

76

DROP MATERIALIZED VIEW

77

CREATE TYPE

78

DROP TYPE

79

ALTER ROLE

80

ALTER TYPE

81

CREATE TYPE BODY

82

ALTER TYPE BODY

83

DROP TYPE BODY

84

DROP LIBRARY

85

TRUNCATE TABLE

86

TRUNCATE CLUSTER

91

CREATE FUNCTION

92

ALTER FUNCTION

93

DROP FUNCTION

94

CREATE PACKAGE

95

ALTER PACKAGE

96

DROP PACKAGE

97

CREATE PACKAGE BODY

98

ALTER PACKAGE BODY

99

DROP PACKAGE BODY

100

LOGON

101

LOGOFF

102

LOGOFF BY CLEANUP

103

SESSION REC

104

SYSTEM AUDIT

105

SYSTEM NOAUDIT

106

AUDIT DEFAULT

107

NOAUDIT DEFAULT

108

SYSTEM GRANT

109

SYSTEM REVOKE

110

CREATE PUBLIC SYNONYM

111

DROP PUBLIC SYNONYM

112

CREATE PUBLIC DATABASE LINK

113

DROP PUBLIC DATABASE LINK

114

GRANT ROLE

115

REVOKE ROLE

116

EXECUTE PROCEDURE

117

USER COMMENT

118

ENABLE TRIGGER

119

DISABLE TRIGGER

120

ENABLE ALL TRIGGERS

121

DISABLE ALL TRIGGERS

122

NETWORK ERROR

123

EXECUTE TYPE

157

CREATE DIRECTORY

158

DROP DIRECTORY

159

CREATE LIBRARY

160

CREATE JAVA

161

ALTER JAVA

162

DROP JAVA

163

CREATE OPERATOR

164

CREATE INDEXTYPE

165

DROP INDEXTYPE

167

DROP OPERATOR

168

ASSOCIATE STATISTICS

169

DISASSOCIATE STATISTICS

170

CALL METHOD

171

CREATE SUMMARY

172

ALTER SUMMARY

173

DROP SUMMARY

174

CREATE DIMENSION

175

ALTER DIMENSION

176

DROP DIMENSION

177

CREATE CONTEXT

178

DROP CONTEXT

179

ALTER OUTLINE

180

CREATE OUTLINE

181

DROP OUTLINE

182

UPDATE INDEXES

183

ALTER OPERATOR

  

 

原文地址:http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm