MartyConnelly
martyconnelly at shaw.ca
Mon Nov 28 17:28:23 CST 2005
Is this because you don't have a version of SQL EM? Maybe a call to DBCC in SQL to get user connection. Another way that might be more exact. You could use WMI and check through each machine name in the domain and check for running adp task processes. You could then maybe and I stress maybe also find out if a particular adp file is open on that machine via some similar WMI method. WMI can also give you all machine names in a domain. Look at various sample scripts here http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/ This might be time consuming. Something like this 'Reports the account name under which each process on a computer is running. 'you would have to run this for every machine name. Dim strComputer As String Dim strUserDomain As String Dim strNameofUser As String Dim colProcessLiust As Object Dim objProcess As Object Dim objWMIService As Object Dim colproperties as variant 'or is it object strComputer = "." 'This is the machine name in the domain. "." indicates "local" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery _ ("Select * from Win32_Process") For Each objProcess in colProcessList colProperties = objProcess.GetOwner(strNameOfUser,strUserDomain) debug.print "Process " & objProcess.Name & " is owned by " _ & strUserDomain & "\" & strNameOfUser & "." Next David Emerson wrote: >I am trying to identify what users have a database open. adp's don't >seem to have an ldb file (presumably because they use SQL and not >Jet). Apart from looking at the current activity in SQL management, >is there any other way of finding out who has an adp or ade open? > >Regards > >David Emerson >Dalyn Software Ltd >999 Moonshine Rd, RD 1 >Judgeford, Porirua >New Zealand 6006 >Phone 0064 4 235-6782 >Fax 0064 4 235-6783 > >__ > > > > -- Marty Connelly Victoria, B.C. Canada