Open edge 11.3 disconnect login - Forum - OpenEdge General - Progress Community

Open edge 11.3 disconnect login

 Forum

Open edge 11.3 disconnect login

  • Hiya

    We have a scheduled task that runs as user stask01 which imports files into the database.

    These usualy take a couple of mins.


    How ever the stask01 id remains connected so through out the day there are multi sessions of the same user is.


    Normally go into promon, shut downdatabase and disconnect the user 1 by 1. by using the usr number.

    Thats after i stopped the task above from running otherwise would still be getting logins

    Is there a quicker way to mass disconnect this user? say from the user id?

    Point out very new to progress :(

    So any help would be great

  • Sounds to me like you need to get the code fixed that connects to the database so that it also disconnects when done rather than trying to fix it from a database perspective. I have maybe disconnected 2 users in the last 6 months and feel that's a bit much.

  • 3rd party sadly who have problems with this.. rarther annoying.. any idea of a work around as above?

    Have to remove about 60 users a day (Of the same person)

  • You can use the code from another thread you commented on few minutes ago and replace SYSPROGRESS with “your” username or if you are on Unix I suppose you can also use this
     
    for in in `proshut dbname -C list | grep username | awk {'print $1'}`
    do
    proshut dbname -C disconnect $i
    sleep 1
    done
     
    or write an equivalent in powershell if windows.
     
  • Sadly using windows...

    How do i execute that script from promon for promon to run it? Or as any one got a power shell version of the above please

  • I am not sure I understand the promon remark. Promon is the script itself, which calls _mprshut (so does proshut).
     
    Why don’t you use the zap.p from another thread then ? I believe all you have to do is to replace SYSPROGRESS there and then run it (prowin32 / _progres –db …. -p zap.p)
     
  • ahh ok thankyou will give it ago.

    Thank you for your help and patience

  • yup i am rubbish at this....

    How do i get the script to execute so that i can disconnect users with the above mentioned ID

    Will point out i have had this lumbered onto my self with no formal training of progress so winging it atm so i apologise if i seem like a spanner at time.

  • Steve,
     
    the code you can use is here: community.progress.com/.../30693
     
    You would need to replace SYSPROGRESS there with the username you wish to disconnect and then use client (prowin32/_progres to run it while being connect to the database and being on machine where db is).
     
    /LL
  • ok i have dropped the code into a text doc, stuck it as a file with ext as a .p

    Dropped into progress navigated to our db then ran command promon ih (IH being name of our db)

    now i get the usual options..

    I run (prowin32/_progres) from power shell?

  • There is no need for promon.
     
    The code (zap.p) queries the _connect table to see who is connected and it will get their userids (of those users you want to disconnect) and then it will execute the disconnect on its own by calling proshut –C disconnect userid.
     
    So save the code to something.p
     
    Open ‘proenv’ on the database machine.
     
    “prowin32 -db ih -p something.p”
     
    Assuming you have development license there, if not you would need to compile it first into .r .
     
    If you want to have it run automatically every XX hrs, then put it into .cmd/bat and schedule it from Task Scheduler.
     
    I would also suggest to test it first on a test database with few users so you are sure that it does what it is supposed to do before you fire it up against production db.
     
  • Ok done above and on our test db (I would get shouted at lots if i didnt)

    Getting a progress box open saying :-

    R-code file not located for "Zap.p" (473)

    ** unable to run startup procedure zap.p (492)

    I have coped the zap.p file i created ito the same folder as the db location

  • ahh add the -rx bit to it now getting can only compile encrypted

  • now xcode locks up on me lol

  • Compile the code on the machine where you have dev license (assuming you have one somewhere) and then deploy the .r onto your db machine.