select S.config, SY.name, S.value2 from syscurconfigs S, sysconfigures SY
where SY.name="number of user connections" and SY.config = S.config
select S.config, SY.name, S.value2 from syscurconfigs S, sysconfigures SY
where SY.name="number of user connections" and SY.config = S.config
2 comments:
Please check following queries there are really good to know user connections
--Estos Queries te dan toda la informacion de las conexiones en un servidor
select "LOGIN"=suser_name(suid),"DATABASE NAME"=db_name(dbid),"LOGIN CONNECTIONS"=count(*) --#users per database
from sysprocesses group by suser_name(suid),db_name(dbid)
go
select spid, "loginname"=suser_name(suid), "dbname"=db_name(dbid), hostname, ipaddr, program_name, blocked
from master..sysprocesses
go
select count(*) 'Current USERS connections'
from master..sysprocesses p, master..syslogins l
where p.suid = l.suid
and l.name <> 'NULL'
and l.name <> 'sa'
go
Select suser_name(suid), count(*) from master..sysprocesses group by suser_name(suid)
go
Select ipaddr, count(*) from master..sysprocesses group by ipaddr
go
Select hostname, count(*) from master..sysprocesses group by hostname
go
sp_client_addr --te muestra todos los usuarios y de donde se conectan
go
muy buenos, muchas gracias
Post a Comment