Killing User Sessions upon closing window

How can we kill the user session people if people just go in
and close the window by hitting x on the top of the browser? Any
feedback and help would be greatly appreciated.

Technically, you can't kill a user's session upon them
closing the window.
What you _can_ do is use J2EE session tracking, or a
transient cookie that gets deleted when the browser quits. That
still doesn't kill the session when they close the window. The
session remains active until the timeout time has elapsed.

Similar Messages

  • Kill User Sessions in Enterprise

    I was told that there was some code here that would allow me to kill user sessions in BOE XI 3.1 SP3. Can anyone point me in the right direction?

    If you have access to Service Market Place, you can search for KB 1468652. 
    It includes the following information, the code snippets are java code, you will just need to convert it to .NET:
    This method was not supported in version XI R2, but it is supported in version XI 3.1.  The steps are:
    1. Retrieve the connection objects using the following query and determine the SI_ID of the connection you want to terminate.
    SELECT SI_ID, SI_USERID, SI_NAME, SI_LASTLOGONTIME FROM CI_SYSTEMOBJECTS WHERE SI_KIND = 'Connection' AND SI_FAILOVER_AVAILABLE_UNTIL = NULL AND SI_AUTHEN_METHOD != 'server-token' ORDER BY SI_NAME"
    Do not delete any connections that use the server-token authentication method as those are used to communicate between servers (e.g. between the page server and cache server).
    2. Once you know the SI_ID, retrieve that specific infoobject and delete it.
    IInfoObjects oSessions = (IInfoObjects) iStore.query("SELECT SI_ID from CI_SYSTEMOBJECTS WHERE SI_ID =" + sessionID);
    IInfoObject oSession = (IInfoObject)oSessions.get(0);
    oSessions.delete(oSession);
    iStore.commit (oSessions);

  • Killing user session & and update v$session

    i use
    alter system kill session 'sid,serial#) immediate.
    user session killed but not clean, V$session show that user connect
    i also want clean user session and remove form V$session
    Any one who can do this ...
    Thanks

    Hi,
    >>how remove on killing user session
    As I said before, you just need to wait ... Don't worry about. On the other hand, by finding the SPID, you can force the process to be killed instead of waiting for PMON to wake up and kill it, but I think that it is not necessary.
    Cheers
    Legatti

  • Killing User sessions and user calcs

    Hi all,
    We have a situation where users run their business rules during evening and at times in night.
    We also have a maxl script which does aggregation and other calcs daily in night and it does not run as other calcs are launched by users.
    Is it possible to kill the user session and calcs launched by users before running maxl calculation for consolidations?
    I know I can do in in EAS, but want to try to do it in MAxL for automation.
    Thanks in advance

    You would be better off locking people out. After you kick off the automated calc, killing sessions doesn't stop them from initiating calcs while your automated calc is running. In answer to your question, yes, you can do that in maxl.
    alter system kill request all;
    You have other options if you want to be more selective on what you kill.
    kill request <session-id>
    kill request by user
    kill request on application
    kill request on database
    Check out the technical documentation for more info - http://docs.oracle.com/cd/E17236_01/epm.1112/esb_tech_ref/launch.html.
    Kyle Goodfriend
    http://www.in2hyperion.com
    Please make sure to assign helpful/answered to responses if applicable - it rewards those who help and benefits the user community.

  • Kill user sessions dynamically through PL/SQL

    Hello,
    Every night I have to DROP one user in order to recreate the entire schema. In order to do this I have to disconnect the user from the DB by killing its sessions. I am using following PL/SQL code
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    begin
        for x in (
                select Sid, Serial#, machine, program
                from v\$session
           where username = 'STARSTAGING_DB'
       ) loop
              execute immediate 'Alter System DISCONNECT Session '''|| x.Sid
                      || ',' || x.Serial# || ''' IMMEDIATE';
        end loop;
    end;
    DROP USER starstaging_db CASCADE;
    ALTER SYSTEM DISABLE RESTRICTED SESSION;
    I have also tried using keyword KILL instead of DISCONNECT of session.
    Most of the day this works, user is dropped and new one is created, but sometimes I get the following problem.
    The problem that has occurred in a log file is:
    PL/SQL procedure successfully completed.
    DROP USER starstaging_db CASCADE
    ERROR at line 1:
    ORA-01940: cannot drop a user that is currently connected
    System altered.
    CREATE USER STARSTAGING_DB IDENTIFIED BY *****
    ERROR at line 1:
    ORA-01920: user name 'STARSTAGING_DB' conflicts with another user or role name
    Does anyone have an idea how I can make sure that the user for sure disconnects, so that I can drop him?
    Best Regards,
    Vladimir

    Cannot comment on a better approach as that means a proper analysis of the business requirements. Just keep in mind that killing sessions is a brutal way to manage user connectivity to the database - and should be seen as an exception and the last resort.
    You can wrap your schema drop code into a retry loop. Something as follows:
    loop
       begin
          ..do the drop..
          success := true;
      exception when FAILED then
          dbms_lock.sleep(60); -- sleep 60 seconds
      end;
      retry := retry + 1;
      exit when success or retry > HAVE_WAITED_LONG_ENOUGH;
    end loop;

  • Killing a user session through API

    Hi,
    I want to create a procedure for killing user sessions.
    Following is the code
    create or replace procedure kill_session (sess_no number,serial_no number)
    as
    v_sid number;
    v_serial number;
    V_flag char := 'U';
    begin
    v_sid := sess_no;
    v_serial := serial_no;
    dbms_output.put_line(v_sid||v_serial);
    select 'S' into v_flag from sys.v_$session where sid=v_sid and serial#=v_serial;
    dbms_output.put_line(v_flag);
    --exception
    --when no_data_found then
    -- dbms_output.put_line('No session');
    if v_flag ='S' then
    dbms_output.put_line('true');
    execute immediate 'alter system kill session ''v_sid,v_serial'' ';
    end if;
    end;
    It return error : ORA-00026: missing or invalid session ID
    But I am passing valid sid and serial#.
    Again When I am executing
    begin
    execute immediate 'alter system kill session ''64,6677''' ;
    end;
    It works fine. What is the problem,can anyone suggest .
    Regards,
    Neeraj

    Hi Justin,
    Thanks for your reply. I have verified the right number of quotes,still it doesn't work. Please look.
    declare
    2 v_sid number :=42;
    3 v_serial number :=26633;
    4 begin
    5 EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION '' || v_sid || ',' || v_session || ''';
    6 end;
    7 /
    EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION '' || v_sid || ',' || v_session || ''';
    ERROR at line 5:
    ORA-06550: line 5, column 62:
    PLS-00103: Encountered the symbol "," when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod not rem return
    returning <an exponent (**)> <> or != or ~= >= <= <> and or
    like between into using || bulk
    The symbol ". was inserted before "," to continue.

  • How to end user session correctly as sys or system user

    Hi,
    Database version Oracle 10.2.0.3
    We have to end user sessions to update database content. We cant stop/shutdown the instance but we have to assure that some users are not logged on.
    So we are looking for a solution to end some arbitrary user sessions as sys or system user without using the KILL USER SESSION option. We want to assure that the user sessions end correctly.
    Is there a possibility or a command in Oracle 10g to end a user session correctly ?
    Thanks for your assistance.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2013.htm#i2053602
    I think DISCONNECT SESSION Clause is what you are looking for.
    Let us know if this is not the case.

  • How to delete last user session from backend SQL query?

    Sometimes user session gets closed between some work by any reason.
    When next time that user logs to P6, he gets some error or particular functionaly dosen't work for that user or system hangs.
    In that case if i decided to clear last session history of that user from database, how to write SQL query?
    I don't want to delete all user sessions from table USESSION and USESSAUD, i simply want to delete last user session of particular user (E.g XYZ).

    I am quoting this from MOS Doc Id "Why would multiple session records be present in the User Sessions screen in P6 Web, and why might some of them have different IP addresses? (Doc ID 1600172.1)"
    Multiple sessions show up for users since different sections of P6 Web have their own sessions associated with them. If a user is authorized to use multiple areas of the software they will have multiple sessions each time they log in. Additionally, if users are closing their browsers before logging out of P6 Web Access you might see some past sessions still appearing in the list. These will eventually be cleared out by background jobs, however you can also reset the sessions in the software by clicking the "Reset User" link (Administer > User Sessions > Manage User Sessions), or by choosing the "Reset All Users" link (Administer > User Sessions > Manage User Sessions) to do this for all past sessions.
    Multiple IP addresses for sessions can happen when a user logs in from different machines. For example, a person may login at their desk, but then go to a colleagues workstation to discuss a project, and log in from there. Doing so will leave them with multiple IP addresses in the session records.
    Hope this helps
    Regards,
    Sachin Gupta

  • Long delay for ManagedEventWatcher __InstanceCreationEvent query as number of user sessions increases

    We have a Windows service that monitors for process start events and sends notifications to client applications.
    We have discovered that the delay between when a process starts and when our EventArrivedEventHandler is called gets excessively long when the number of user sessions on the Windows server gets to about 80.
    The delay gets worse as the number of user sessions gets higher.
    The delays are not consistent. Even with 100 sessions some observed delays are short but most are too long and the maximum observed delay grows with the number of sessions.
    Here is one example of the delay we are seeing.
    A client application wrote its first log record to its log file at 11:05:34.076. Our EventArrivedEventHandler did not get notified of the process start event for the client application until 18 seconds later (at 11:05:52.188 ).
    We need the delay to be less than 5 seconds to be tolerable and would like the delay to be less than 3 seconds if possible.
    Is there something we can do to reduce the delay? Below are the details of our use of WMI.
    We are using an instance of class WqlEventQuery to represent a WMI event query in WQL format.
    We are constructing an instance of ManagementEventWatcher to consume events asynchronously.
    Below is how we are instantiating and running the query. Variable m_PollingIntervalInMilliseconds is set to 1000 by default.
                    WqlEventQuery query = new WqlEventQuery("__InstanceCreationEvent", new TimeSpan(0, 0, 0, 0, m_PollingIntervalInMilliseconds), "TargetInstance isa \"Win32_Process\"");
                    m_ManagementEventWatcher = new ManagementEventWatcher(query);
                    m_ManagementEventWatcher.EventArrived += new EventArrivedEventHandler(managementEventWatcher_EventArrived);
                    m_ManagementEventWatcher.Start();
    Our Windows service is not the only user of WMI services on the server. I do not know if there is contention with other users of WMI services or if there is something about the way we are consuming WMI services that is inefficient.

    Hello RossAtWFMC,
    It seems that the services are working with a complex environment, and currently, we do not have such an environment which could reproduce this issue you described. Anyway, I would like to share whatever I found and some suggestions about this issue:
    >> called gets excessively long when the number of user sessions on the Windows server gets to about 80.
     The delay gets worse as the number of user sessions gets higher.
    This seems to show that the issue is related with the number of user sessions, it may be that when with lots of user sessions, there are something additional delay the event to be fired. As you mentions, there are other services on that server machine, if
    possible, you could make a test to run your WIM service only to see if it is still delayed.
    >> Is there something we can do to reduce the delay?
    I suggest that you could check this blog below which provide a way to debug with the .NET course code:
    http://blogs.msdn.com/b/dotnet/archive/2014/02/24/a-new-look-for-net-reference-source.aspx
    So that you could know which method inside costs most time.
    From your provided code, it is not very clear if you use multi threads in your service, if not and your event handler is short, you could have a try with it, and there is a discussion about this topic:
    https://social.msdn.microsoft.com/Forums/en-US/13f30e33-7f61-498e-a91a-ef982a63453c/event-handling-in-multithreaded-apps?forum=netfxbcl
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to kill db-session when explored is closed?

    Hi all,
    Is there an easy way to kill database sessions when the explorer window is closed?.
    I tried to set the "disconnect application module upon release" checkbox on the module, but than my application doesn't work correctly...
    I'm getting errors like:
    Jul 17, 2007 6:34:10 PM com.sun.faces.lifecycle.ProcessValidationsPhase execute
    SEVERE: SelectOne submittedValue's index 0 is out of bounds. It should be between 0 and -1
    java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 0 is out of bounds. It should be between 0 and -1
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:347)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer._convertIndexedSubmittedValue(SimpleSelectOneRenderer.java:189)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer.getConvertedValue(SimpleSelectOneRenderer.java:157)
         at oracle.adfinternal.view.faces.renderkit.core.xhtml.InputLabelAndMessageRenderer.getConvertedValue(InputLabelAndMessageRenderer.java:42)

    Hi Arti,
    You may want to check out how to use JDBC Datasources intead of the JDBC URL to connect to your database at the OC4J level. This method will manage the number of open db sessions that the OC4J can access. It is normal to have the sessions connected even after the browser has closed. It actually saves processing on the database because you don't need additional resources to open sessions, and you're reusing technology on connection management that is part of the database DNA. It is designed this way so that the OC4J can reuse existing connections for performance reasons among others.
    To do this on ADFBC, these are the files that you'll need to modify:
    1) data-sources.xml
    2) bc4j.xcfg for every application module to use JDBC Datasources instead of JDBC URL. (Right-click, configuration on the AM)
    However, for testing, the business component browser will need to use the JDBC URL connection.
    I hope this helps.
    Kenton

  • Jinitiator hanging upon closing IE windows

    -- Using IE 6sp1
    -- JInitiator 1.3.1.18
    End users will login to Oracle instance at On Demand, then open multiple other IE windows for forms, etc. All of these windows are in the same iexplore.exe process. Then -- doesn't matter how long the user has had the windows open -- a user can close the main form window then quickly close another window that was in that same iexplore.exe process, and the iexplore.exe process will freeze. It takes 5 - 10 minutes for IE to unfreeze -- of course, no one wants to wait that long, so End Task'ing that iexplore.exe process is usually the course of action. IE sessions to the instances can be started up again without issue -- unless, of course, the person performs the same quick-closes. If the user waits a second or two between closing windows, then the IE windows / process will close just fine.
    Any ideas? Thanks. Rick

    Rick,
    how can you prove that JInitiator hangs if all you describe is IE related ? JInitiator is a plugin within IE and as long as the IE process is active, JInitiator stays active. Open an IE window from an existing IE window shares the browser process.
    If you still think it is JInitiator causing the problem, you can run Forms with teh Java Plugin 1.4
    Frank

  • How do I force other logged in user sessions in Windows 8.1 to log off or disconnect?

    I am running Windows 8.1 on a Dell laptop. There are two user that login to Windows using Microsoft Live accounts. The other user is logged in and remains that way even after a Restart and a Reboot.
    I cannot find a way to force the session to terminate and do not have the users password. So far, I cannot find any Forum postings that will help either.

    Hi Greggor,
    You say they are still logged in after a restart?? if you open task manager and look under users are the session aside yours listed?
    Thanks,
    Adam

  • ALLOW A USER TO KILL A SESSION WITHOUT ALTER SYSTEM PRIVILEGE.

    Hi
    I need a user to have permission to kill a session without having the ALTER SYSTEM privilege. I created a procedure on sys schema and granted the EXECUTE privilege to the user but it doesn't work, how can I do, help please.
    CREATE OR REPLACE PROCEDURE SYS.PRC_SESSION_KILLER (P_SID IN NUMBER, P_SERIAL IN NUMBER)
    AS
    BEGIN
         EXECUTE IMMEDIATE 'GRANT ALTER SYSTEM TO SYSADMIN';
         EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION ''' || P_SID || ',' || P_SERIAL || ''' IMMEDIATE';
         EXECUTE IMMEDIATE 'REVOKE ALTER SYSTEM FROM SYSADMIN';
    END;
    Thank you very much.

    Hi,
    I second everything John said.
    Are you sure the arguments are correct?
    Below is the procedure I use. You may want to run it, just to see what the error is.
    PROCEDURE     kill_internal
         s_id          IN     NUMBER,
         serial_num     IN     NUMBER,
         stat_out     OUT     VARCHAR2
    IS
         alter_handle     INTEGER;
         ex_val          INTEGER;     -- Returned by dbms_sql.execute
    BEGIN
         alter_handle := dbms_sql.open_cursor;
         dbms_sql.parse
              alter_handle,
              'ALTER SYSTEM     KILL SESSION '''     ||
                   TO_CHAR (s_id, '999990')     ||
                   ', '                    ||
                   TO_CHAR (serial_num, '999990')     ||
              dbms_sql.native
         ex_val := dbms_sql.execute (alter_handle);
         dbms_sql.close_cursor (alter_handle);
         stat_out := 'Success: '                    ||
                   TO_CHAR (s_id, '999990')     ||
                   ', '                    ||
                   TO_CHAR (serial_num, '999990');
    EXCEPTION
         WHEN OTHERS
         THEN
              stat_out := 'Failure:'          ||
                   SQLERRM;
    --          dbms_output.put_line (stat_out);
              dbms_sql.close_cursor (alter_handle);
    END     kill_internal
    ;

  • SAPSYS user session  in CLNT 000 not killed

    Hi all!
    I have question.
    When i check in SM04 i have like 50+ user sessions where the user is SAPSYS in clnt 000 the session type is Plugin HTTP. As terminal info there's a IP-number.
    I don't no if its relevant but I'm running an internal ITS. I also run a locally installed IPC (on my laptop since it is a test system).
    My question is why are the sessions not closed down when i log out.
    I understand that the system is creating the sessions.
    Hope you can help me understand!
    //Roland

    Hi Disha!
    We have had memory bottleneck problems and we have applied note 742048 (extending em/global_memory_mb), still this didn't solve the problems with the internal sessions not closing.
    Regards,
    Roland

  • Firefox isn't restoring last session, holding on to old closed windows...

    I have my Firefox browser set to restore my previous session. However, when the browser crashes or my computer is turned off and then back on, it will only restore a single blank browser window. I know a fix around this, though - go to History and Restore Closed Windows. However, for the past three weeks, when I've done this the only windows that are restored are from my session three weeks ago - tabs that were closed get opened, and new tabs that were opened are now missing. Clearing my history and restarting my computer have not helped. Does anyone know why this is occurring and what I can do to fix it?
    Thanks.

    You can check for problems with the sessionstore.js file in the Firefox profile folder that store session data.
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Multiple_profile_files_created
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible).
    *http://kb.mozillazine.org/Session_Restore
    *https://support.mozilla.org/kb/restore-previous-session

Maybe you are looking for

  • I cannot boot from HDD nor CD/DVD drive - Satellite C

    I want to recover my laptop & i need to boot from cd. I pressed F12 first time & boot from cd but i discoverd that i have put another cd just when i restarted (correctly) i could not boot from cd neither hdd. When i log in bios hdd was detected but n

  • URGENT: Service Call Activity Issue

    Hi guys, I have a seriously irritating issue concerning the linking of an activity to service call. As of Service Pack 01, Patch 36 (at least as far as I know) I get the following error when attempting to create and link an activity to a service call

  • BI SDK/XMLA (MDX) - Does the query execution go through SAP BI Accelerator?

    Environment : Portal - EP7.0 SPS 14, BI 7.0 SPS17 I have written customer report views which uses the BI SDK to execute BI querries through the portal. Following link provides the detail about configuring the portal to access the BI system and execut

  • Error:Excel error in BIP server

    Hi all, I developed a template which gives excel output. I tested and its working fine in MS word. I uploaded into the BIP server and when I am trying to view the report in excel format. It is not showing up but giving me this error: Missing file: ..

  • "undefined" error or "indexof"

    I keep getting "undefined" is not an object or "indexof" object is null or undefined error. I sent some calendar invites from another account to mine. It went to my email not my calendar and when I try to click to accept the invite it gives me these