v$session是oracle的一个系统视图,不是一个数据库对象。
oracle作了处理,允许你用select语句来获取信息。
数据库处于mount模式就可以看到。所以,你是看不到创建的sql语句的。
类似的有v$sga,v$parameter等等C:\>svrmgrlOracle Server Manager Release 3.1.7.0.0 - ProductionCopyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - ProductionSVRMGR> connect internal
Connected.
SVRMGR> startup mount
ORACLE instance started.
Total System Global Area 94513180 bytes
Fixed Size 75804 bytes
Variable Size 77582336 bytes
Database Buffers 16777216 bytes
Redo Buffers 77824 bytesSVRMGR> select sid,username,logon_time,machine,program from v$session;
SID USERNAME LOGON_TIM MACHINE
PROGRAM---------- ------------------------------ --------- ----------------------------
------------------------------------ -------------------------------------------
---------------------
1 17-OCT-03 SAM
ORACLE.EXE 2 17-OCT-03 SAM
ORACLE.EXE 3 17-OCT-03 SAM
ORACLE.EXE 4 17-OCT-03 SAM
ORACLE.EXE 5 17-OCT-03 SAM
ORACLE.EXE 6 17-OCT-03 SAM
ORACLE.EXE 7 17-OCT-03 SAM
ORACLE.EXE 8 17-OCT-03 SAM
ORACLE.EXE 9 17-OCT-03 SAM
ORACLE.EXE 10 17-OCT-03 SAM
ORACLE.EXE 11 SYS 17-OCT-03 DOMAIN\SAM
SVRMGRL.EXE11 rows selected.
oracle作了处理,允许你用select语句来获取信息。
数据库处于mount模式就可以看到。所以,你是看不到创建的sql语句的。
类似的有v$sga,v$parameter等等C:\>svrmgrlOracle Server Manager Release 3.1.7.0.0 - ProductionCopyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - ProductionSVRMGR> connect internal
Connected.
SVRMGR> startup mount
ORACLE instance started.
Total System Global Area 94513180 bytes
Fixed Size 75804 bytes
Variable Size 77582336 bytes
Database Buffers 16777216 bytes
Redo Buffers 77824 bytesSVRMGR> select sid,username,logon_time,machine,program from v$session;
SID USERNAME LOGON_TIM MACHINE
PROGRAM---------- ------------------------------ --------- ----------------------------
------------------------------------ -------------------------------------------
---------------------
1 17-OCT-03 SAM
ORACLE.EXE 2 17-OCT-03 SAM
ORACLE.EXE 3 17-OCT-03 SAM
ORACLE.EXE 4 17-OCT-03 SAM
ORACLE.EXE 5 17-OCT-03 SAM
ORACLE.EXE 6 17-OCT-03 SAM
ORACLE.EXE 7 17-OCT-03 SAM
ORACLE.EXE 8 17-OCT-03 SAM
ORACLE.EXE 9 17-OCT-03 SAM
ORACLE.EXE 10 17-OCT-03 SAM
ORACLE.EXE 11 SYS 17-OCT-03 DOMAIN\SAM
SVRMGRL.EXE11 rows selected.
public.v$session严格说来不是一个视图,而是sys.v_$session的一个同义词,可以在synonyms下面看到
而v_$session是一个视图,它的sql为select * from v$session.这是怎么回事? 这不是互相引用吗? 互相矛盾?