Header

  1. View current page

    정상혁의 수첩

Profile_img_60x60_08
195

Sybase 로그인 현황쿼리

sybase 로그인 id별 proces s숫자 집계 쿼리

 

sa 계정으로 로그인해서,

 

 select
   p.hostname,
   p.ipaddr,
   p.cnt,
   (select l.name from syslogins l where l.suid = p.suid) name
from
(select s.hostname, s.ipaddr, s.suid,
          count(*) cnt from sysprocesses s
group by s.hostname, s.ipaddr ,s.suid ) p

 

 WAS에서 붙어 있는 현재 connection 갯수를 파악할 때 사용했습니다. 간단한 쿼리이고 비슷한 기능의 내부함수가 있을런지도 모르겠네요. 보통 WAS에서 설정한 connection pool의 max 숫자 아래로 나오고 있으나 초과하는 경우도 보입니다. 그럴 경우에는 해당 로그인 id로 붙을 때 WAS에서 제공하는 connection pool을 안 쓴 프로그램들이 존재하고 있다는 의미로 파악됩니다. 왠만하면 한 군데에서 pool관리하는것이 설정바꿀때도 편할텐데 말이죠.

 

혹시나 필요하신 분들이 찾으실 때 검색엔진에 잘 걸렸으면 하는 마음에 여기에 올려봅니다.

 

 

[User Environment]
        number of user connections = 100

 

 

select @@max_connections

 

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sag1/html/sag1/sag1272.htm

 

 

 

 

History

Last edited on 07/10/2007 19:47 by benelog

Comments (0)

You must log in to leave a comment. Please sign in.