Groups | Blog | Home
all groups > sql server msde > june 2006 >

sql server msde : How many user are conected to a MSDE Database? (From a VB Application)


Grupo ESI
6/9/2006 10:53:11 AM
Hi all,

I'd like to know how can I know (from a VB application) how many user are
conected to a MSDE Database ?

Best regards,

--
Jorge L. Cotarelo

(Please forgive my English)

Grupo ESI
6/9/2006 12:48:55 PM
Thank you!

----

Ciao Andrea,
tante grazie per la informazione.

Cordiali saluti dall'Argentina,

Jorge L. Cotarelo

"Andrea Montanari" <andrea.sqlDMO@virgilio.it> escribió en el mensaje
news:4etgkbF1gdvu8U1@individual.net...
[quoted text, click to view]

Andrea Montanari
6/9/2006 4:58:17 PM
hi,
[quoted text, click to view]

hor simple eval, you can see what sp_who reports, like

SET NOCOUNT ON;
CREATE TABLE #Process (
spid INT ,
ecid INT ,
status NCHAR(30) ,
loginame NCHAR(128) ,
hostname NCHAR(128) ,
blk CHAR(5) ,
dbname NCHAR(128) ,
cmd NCHAR(16)
) ;

INSERT INTO #Process EXEC sp_who;
SELECT COUNT(*) FROM #Process WHERE dbname = 'pubs';
DROP TABLE #Process;

--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.19.0 - DbaMgr ver 0.63.0 and further SQL Tools
--------- remove DMO to reply

AddThis Social Bookmark Button