Unlock the records
Hello,
I want to search a process ID in Object Script using the reference variable e.g. 1119102928 and kill that process ID. Please guide how it can be achieved.

Thanks in advance.
Vinay Purohit
Comments
1. Execute this query:
SELECT ID FROM %SYS.ProcessQuery WHERE LastGlobalReference [ '1119102928'2. Iterate over result set. ID is process ID.
3. Kill process by id:
do $system.Process.Terminate(processId)Thank you Eduard for your support. I am not getting this number in LastGlobalReference column. In this column it's showing process ID.


I want to search the PID using the number showing in Lock section highlighted.
Thank you.
Thanks a lot Robert, its working.
Hi Robert,
Our Apache is installed in Server 'A' but these process are exist in Server 'B'. Both the server are linked to each other. I have created a routine to unlock the process in Server 'A' and also able to execute this through the Terminal/Putty of Server 'B', where I am able to locate the process id using lab episode number '1119102928'.
Please suggest how I can access the process id of Server 'B' in csp or terminal of Server 'A'.
Thanks in advance.
Vinay Purohit
You can get the pid without iteration.
set pid=^$|nsp|lock("^DBLock(""Patient"",1119102928)","OWNER")
do $system.Process.Terminate(pid)
|nsp| is only required for access to a lock in a different namespace.
Independent of the way how your servers are linked It might be the easiest to have SOAP service to call each other passing the lab episode number '1119102928' as a parameter.
If a lock exists it will be removed. if not nothing happens.
Studio has an easy to use SOAP wizard to create the Server and Client part.