Use either one:
SELECT 'Currently, ' ||
(SELECT COUNT(*) FROM V$SESSION) || ' out of ' || VP.VALUE || ' connections are used.' AS USAGE_MESSAGE FROM V$PARAMETER VP WHERE VP.NAME = 'sessions' ;
SELECT 'Currently, ' || (SELECT COUNT(*) FROM V$SESSION) || ' out of ' ||
DECODE(VL.SESSIONS_MAX,0,'unlimited',VL.SESSIONS_MAX) || ' connections are used.' AS USAGE_MESSAGE FROM V$LICENSE VL;
SELECT 'Currently, ' ||
(SELECT COUNT(*) FROM V$SESSION) || ' out of ' || VP.VALUE || ' connections are used.' AS USAGE_MESSAGE FROM V$PARAMETER VP WHERE VP.NAME = 'sessions' ;
SELECT 'Currently, ' || (SELECT COUNT(*) FROM V$SESSION) || ' out of ' ||
DECODE(VL.SESSIONS_MAX,0,'unlimited',VL.SESSIONS_MAX) || ' connections are used.' AS USAGE_MESSAGE FROM V$LICENSE VL;
No comments:
Post a Comment