How to disconnect a group of users

Posted by Admin on 04-Sep-2009 08:45

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

All Replies

Posted by ChUIMonster on 04-Sep-2009 10:15

/* 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.

Posted by Admin on 07-Sep-2009 15:17

Thanks!

Posted by Steve Jones on 07-Oct-2015 03:45

how do you get progress to run this? (Very much a noobie)

Posted by kevin_saunders on 08-Oct-2015 05:21

mpro <db-name> -p zap.p

This thread is closed