Hi!
How can I disconnect a group of users with the same name?
Example: I have 5 users "sysprogress" connected on the database and i need do disconnect all of them.
Thanks!
Eduardo Hahn Neto
/* zap.p
*
* disconnect self-service users and remote clients with a given name, leaves APWs etc running.
*
*/
find _MyConnection no-lock.
for each _Connect no-lock where ( _Connect-Type = "SELF" or _Connect-Type = "REMC" ) and _Connect-Usr <> _MyConn-UserId and _Connect-Name = "SYSPROGRESS":
/*
display
_Connect-Id
_Connect-Usr
_Connect-Type
_Connect-Name
_Connect-Device
_Connect-Batch
.
*/
os-command silent value(
substitute( "&1 proshut &2 -C disconnect &3 >> /tmp/disconnect.&2.log",
( if opsys = "windows" then "call" else "" ),
pdbname( 1),
string( _Connect-Usr )
)
).
end.
Thanks!
how do you get progress to run this? (Very much a noobie)
mpro <db-name> -p zap.p