select * from v$session where username is not null

解决方案 »

  1.   

    select * from v$session where status ='INACTIVE' and username is not null
      

  2.   

    select count(*) from v$session where status ='INACTIVE' and username is not null
      

  3.   

    select count(*) from v$session where type!='BACKGROUND'
      

  4.   

    是这句!
    select count(*) from v$session where status ='INACTIVE' and username is not null
      

  5.   

    那个状态STATUS代表什么,INACTIVE 和 ACTIVE 怎么区别,还有用一个用户连上,执行两个查询算几个连接
      

  6.   

    STATUS  
     
     Status of the session: ACTIVE (currently executing SQL), INACTIVE, KILLED (ed to be killed), CACHED (temporarily cached for use by Oracle*XA), SNIPED (session inactive, waiting on the client)
     
    ---
    active当前正在执行的sql.
      

  7.   

    select * from v$session where username is not null;
    一个jsp就是一个连接(如果没有使用连接池)。你应该使用连接池技术,这样就可以不用考虑连接数目了。
      

  8.   

    select count(*) from v$session where status ='INACTIVE' and username is not null