borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Force Shutdown a Network Computer)Next Topic (client - server(winsock)) New Topic New Poll Post Reply
AndreaVB Forum : Network : sql server connection and vb6
Poster Message
bybruno
Level: Protégé

Registered: 16-09-2005
Posts: 6

icon sql server connection and vb6

hi,
i using sql server 2000 with 4 or 6 clientes and i need to know in any clientes at any time which clientes are connected to the sql server.
There is any way or function of the sql server that permit to get the ip or any information of the currents connection´s to the sql server?
thanks for the attention
bruno

12-09-2006 at 08:38 PM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: sql server connection and vb6

Hi bruno,
You can run the built-in stored procedure "sp_who" with the "dbname" parameter:-
USE master
EXEC sp_who 'databasename'

This will return a result set that contains info about who is connected to your database and the name of their computer. If you run the sp without the param it will list all connections and show which database they are connected to and if they are currently active.

Take a look at the SQL2000 Help files for more info - and also have a look at "sp_monitor" which will return all kinds of info about whats going on.


____________________________
multi-tasking - the ability to hang more than one app. at the same time.

13-09-2006 at 04:52 PM
View Profile Send Email to User Show All Posts | Quote Reply
yronium
Level: Moderator


Registered: 14-04-2002
Posts: 907
icon Re: sql server connection and vb6

Hello. Alternately, you can reference a SQLDMO object to your project: it exposes several useful features to monitor connections, activeusers, activeservers, SQLServer dirs, and so on.

Hope it helps

____________________________
Real Programmer can count up to 1024 on his fingers

13-09-2006 at 06:13 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Network : sql server connection and vb6
Previous Topic (Force Shutdown a Network Computer)Next Topic (client - server(winsock)) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder