daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Sep 14th, 2017 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT name, value
  2.   FROM v$parameter
  3.  WHERE name = 'sessions'
  4.    
  5. SELECT COUNT(*)
  6.   FROM v$session
  7.    
  8. SELECT
  9.   'Currently, '
  10.   || (SELECT COUNT(*) FROM V$SESSION)
  11.   || ' out of '
  12.   || DECODE(VL.SESSIONS_MAX,0,'unlimited',VL.SESSIONS_MAX)
  13.   || ' connections are used.' AS USAGE_MESSAGE
  14. FROM
  15.   V$LICENSE VL
  16.    
  17. SELECT
  18.   'Currently, '
  19.   || (SELECT COUNT(*) FROM V$SESSION)
  20.   || ' out of '
  21.   || VP.VALUE
  22.   || ' connections are used.' AS USAGE_MESSAGE
  23. FROM
  24.   V$PARAMETER VP
  25. WHERE VP.NAME = 'sessions'
  26.    
  27. select current_utilization, limit_value
  28.     from v$resource_limit
  29.     where resource_name='sessions';
  30.    
  31. select resource_name, current_utilization, max_utilization, limit_value
  32.     from v$resource_limit
  33.     where resource_name in ('sessions', 'processes');
  34.    
  35. select resource_name, current_utilization, max_utilization, limit_value
  36.     from v$resource_limit
  37.     where resource_name in ('sessions', 'processes');
  38.    
  39. SQL> show parameter sessions
  40.    
  41. SQL> show parameter sessions
  42.    
  43. NAME                                 TYPE        VALUE
  44. ------------------------------------ ----------- ------------------------------
  45. java_max_sessionspace_size           integer     0
  46. java_soft_sessionspace_limit         integer     0
  47. license_max_sessions                 integer     0
  48. license_sessions_warning             integer     0
  49. sessions                             integer     248
  50. shared_server_sessions               integer
  51.    
  52. select count(*),sum(decode(status, 'ACTIVE',1,0)) from v$session where type= 'USER'
RAW Paste Data
Top