Appropriate Session Locking

Our site framework creates a User.cfc object and assigns it
to the session variable SESSION.User. The User object has all the
usual CRUD methods plus instance variables for if the user is
logged in and various other account flags. The object is created in
the Application.cfc onRequestStartMethod() and is wrapped in a
session lock tag. When a user logs in, the
SESSION.User.UserLogin(useranme,password) method is called, the db
lookups are made, all the instance variables are set, so forth.
Then, all over the site various methods such as
SESSION.User.GetUserID() and SESSION.User.IsUserLoggedIn() are
called for specific actions.For instance, a form post to update an
email address would be SESSION.User.SetEmail(FORM.Email) and then
SESSION.User.SaveUser(). Logging out of the system just clears the
session struct and sets the SESSION.User var to a fresh instance of
the User.cfc.
My question is it is safe to be making calls to the
SESSION.User methods without locking the session scope. I've never
had an issue with memory or race conditions before but a recent
server move and increased traffic has caused some unexplained
results. Just trying to narrow the problem down and am wondering
about best practices in user of objects stored in the SESSION
scope.
Anthony

I set the session like this:
<cffunction name="onSessionStart" returnType="void"
output="false">
<cflock scope="session" timeout="20" >
<cfset StructClear(session)>
<cfset SESSION.User =
CreateObject("component","lib.UserObject")>
<cfset SESSION.Company =
CreateObject("component","lib.CompanyObject")>
</cflock>
</cffunction>
And then yes, I just call SESSION.User.GetUserID() or any
other method as appropriate.
I'm just wondering if any memory or race conditions could
occur if calling the get/set methods of SESSION.User with out
locking it. Is it enough to just lock the assignment of the User
cfc to the SESSION scope.

Similar Messages

  • Create and Save a filter BW7.3 IP : session locks up

    We are upgrading to 7.3. [ patch 5] on our Dev box at the moment. Love the new ABAP stack functionality for IP. BUT we have an issue
    I've created my cubes, and an appropriate agg level -> No problem here.
    Created a filter on the agg level -> no issues thus far.
    SAVE the filter and the session locks up =>> Big problem.
    I've looked in SM50 and there does not appear to be any activity, no log in ST22 either.
    Just the locked up session and in the end having to kill it and retry.
    Subsequent attempts yeild the same result.
    Is anyone aware of issues in the back-end, an OSS note perhaps that might address this. As I mentioned at the top we are on patch 5.
    Thanks

    Thanks Gregor. SP07 may well hold the answer but we are just in the process of implementing and upgrading using SP5 so moving to 7 right now is not a consideration.
    We did find an answer, or at least a favourable outcome. It seems a GUI patch that relates to transaction /RRMX not working also has a positive outcome with this filter save.  Rolling out a GUI patch for all users is problematic given the client and environment issues.
    At least we can continue to develop the IP solutions and get moving again, albeit in an awkward fashion till such time as they decide what to do about the GUI issue or move to SP7.
    Thanks again.

  • Acrobat Std v9.5 browser session locks up past 2nd page

    I updated to v9.5 Acrobat Std. yesterday (from v9.45 --> 9.46 -->9.47 to 9.50). 
    I opened a PDF linked inside a webpage to a new tab (using 32 bit IE9). The webpage PDF opens fine. But when I scroll to the second page (which is black), the browser session locks up (including all open tabs). I have to use Task Manager to kill the particular non-responsive IE9 session (i.e., other, independent IE9 browser sessions do NOT lockup, and do remain running when I kill the errant session ...just guessing, but the non-locked up sessions may be an artifact of independent memory spaces from using W7 64 bit).
    I tried this several times, opening a new browser session each time, trying to view the document past the first page (and if I do not scroll to the second page, the session does not lock up), and the lockup happened each time (i.e., the error is duplicable).
    Testing, I opened another new session, clicked on the PDF link and chose to Save As, and placed the document on my desktop. It downloaded almost instantly, and opened just fine (and I was able to read the entire 7 pages of mixed texts & charts).
    I did not experience this problem with Acrobat v9.45, ever ...and yes, I use that feature often (so I would have known if there had been an issue). I never really tested the issue under Acrobat v.9.46/9.47 (I didn't open those versions at all ...I was doing Adobe updates manually as per my usual routine, and generally follow the sequential order "just in case").
    ...and if no one can point me to a solution, then I suppose I'll have to try removing the update (if that's possible), or deleting Acrobat 9 (after deactivating the license - I read within this forum that you can do that, if you need to uninstall for some reason) and re-installing Acrobat 9.0 from scratch (I'd really rather not do that, but if that's what it takes).
    NOTE: I do not have Adobe Reader installed. My OS is Windows 7 Pro (64 bit) w/8GB of RAM, and Intel Core 2 Quad. My preferred browser is IE9. All software and OS patches are current [to-the-version]. I'm an experienced user (20 years plus as a systems administrator); and non-gamer (i.e., malware free). This is a work box (primarily used for client remote support).
    Cross posted from the Adobe Reader discussion forum (as I didn't get any responses there).

    In reference to this change in the Custom Reports... Better experience when exporting data - to prevent customer confusion when exporting data from Mac computers, we have removed the export to excel option and exporting in CSV format by default.
    What is the customer confusion we are trying to stop here? I've got even more confused customers at the moment because all of a sudden they can't find the export to excel option but know it exists if they log in on a PC?
    Mark

  • XFCE session locked

    Hi all,
    this goes to a problem with XFCE as the new GNOME desktop did not suit my needs.
    XFCE was run fine until a recent update of GNOME packages but it may also be due to incorrect shutdown. Now there's a locked XFCE session (GDM in use) which I cannot terminate or unlock.
    Which steps do I need to undertake to kill the session and/or screensaver manually from terminal?
    Kind regards,
    scoona

    You did help me until now, thanks. Alas, the error is still here. /var/lock is clean except firewall entry, which is fine. A reboot didn't kill the session/lock situation. The session directory in .config (homedir) is empty.
    Two other details may be important:
    - Starting gdm from command line displays the login screen fine, but the pointer changes to a watch and reflects my user as logged in.
    - Logging in as user after init 3 immediately starts up X, which is not intended as I don't like autologin. I dunno the reason for this one.
    I've changed inittab to use gdm instead of xdm but this does not help.
    Any remarks please?

  • How to retrieve the owner of a session lock ?

    Hi,
    I'm building a custom application in Java using CMSDK 9.0.3.1.0. I'm using many session locks, and I'd like to know which DirectoryUser put a session lock on a given object.
    There's an 'LOCKEDFORSESSION_ATTRIBUTE' attribute holding the session id associated to the lock, but I found nowhere in the javadoc a way to get all the sessions opened on the server.
    Does anybody know if there's a way to do this ?
    Thanks for your help,
    Roger

    oracle.ifs.server.S_LibraryService has a method getSessionManagers() which returns oracle.ifs.management.domain.SessionManagerInterface[]. For each LibrarySession connected to this particular LibraryService, there will exist an an associated SessionManager that is essentially a non-published read-only administration API for an iFS session.
    oracle.ifs.server.SessionManager (which implements the SessionManagerInterface) has a method getId() that returns the id of the associated librarysession.
    It also has the following 2 methods that should be useful:
         * Gets the name of the DIRECTORYUSER for which this session
         * was authenticated.
         * @return                    the user name
         * @exception IfsException if the operation fails
         * @nopub
         public String getAuthenticatedUserName()
              throws IfsException
              return m_AuthenticatedUserName;
         * Gets the current DIRECTORYUSER for this session.
         * <p>
         * This is the same as the authenticated user, unless a
         * "feign user" operation has been performed.
         * @return                    the user name
         * @exception IfsException if the operation fails
         * @nopub
         public String getUserName()
              throws IfsException
              return m_UserName;
          LockObject lo = ....
          AttributeValue value = lo.getAttributeByUpperCaseName(LockObject.LOCKEDFORSESSION_ATTRIBUTE);
          long sessionid = (value.isNullValue() ? 0L : value.getLong(m_Session));
          SessionManagerInterface[] sessionMgrs =
            [XXXXX.]getSessionManagers();
          // for every session in the current service...
          for( int k = 0; k < sessionMgrs.length; k++ )
            if (sessionMgrs[k].getId() == sessionid)
          }Matt.

  • Session Locks... Please help this is urgent...

    Hi,
    I've created web application in ASP.NET and I'm connecting to one of our Oracle server which resides in other country. I only have read access to it. I can only do select statements.
    After couple of months that the application was running, their database admin told me that my application was creating session locks in the database.
    I only have 4 select statements that's connection to their oracle server. Below one of the query that I'm using.
    IDataReader r = null;
    try
    using (OracleConnection conn = new OracleConnection(this.ConnectionString))
    string _return;
    conn.Open();
    OracleCommand command = new OracleCommand("select site from mashreq_employees where employee_code='" + emplid + "'", conn);
    r = this.ExecuteReader(command);
    if (r.Read())
    _return = r.ToString();
    else
    _return = "";
    return _return;
    finally
    if (r != null)
    r.Close();
    My question is, Can I create Session Locks even if I'm only using SELECT STATEMENT?
    They send me the screen shot of their Enterprise Manager but I cannot paste it here. The Lock Type was "TX".
    Please help me...
    Thanks,
    Liezl

    I didn't see a FOR UPDATE in the code you posted but I don't know what the rest of your code/application does. For all I know the below code adds a FOR UPDATE at the end?
    OracleCommand command = new OracleCommand("select site from mashreq_employees where employee_code='" + emplid + "'", conn); Am trying to say that just because you're using SELECT only doesn't necessarily mean it's non-destructive, in nobody elses way "read-only", it is still possible to do a SELECT FOR UPDATE if you have the SELECT privilege for a table which might explain any TX locks for your session.
    SQL> create table a1 as (select * from user_tables);
    Table created.
    SQL> create table b1 as (select * from user_tables);
    Table created.
    SQL> select * from b1 where table_name = 'A1' for update;Now go to another session and try to update the table
    update b1 set table_name = 'Z';Session will hang, until original session either commits or rolls back. Investigating further:
    SQL> select session_id, object_id from v$locked_object;
    SESSION_ID  OBJECT_ID
            25      17552
    SQL> column object_name format a30
    SQL> select owner, object_id, object_name from dba_objects where object_id = 17552
    OWNER                           OBJECT_ID OBJECT_NAME
    TESTUSER                            17552 B1
    SQL> select sid, type, lmode, id1, id2 from v$lock where sid = 25;
           SID TY      LMODE        ID1        ID2
            25 TM          3      17552          0     <---- see the 17552 which is the B1 table and session 25 which is the session that did the FOR UPDATE?
            25 TX          6     589824        424So, see if you can track down which session is creating the locks from the data dictionary tables and whether it is your code.

  • Imexpire cannot get session lock when run with scheduler

    When imexpire runs at the scheduled time, it produces:
    [15/Nov/2007:22:01:00 -0800] vmpm1 imexpire[7946]: General Error: Could not get expire session lock. Possibly another imexpire is running
    I found an imexpire.lck file and deleted it, but got the same error the next day. Next, I restarted messaging, then ran imexpire interactively with no problems. The imexpire.lck file remained and was not removed afterward. Our imexpire policy was migrated from ims5.2 and is housed in configutil. Can you give me any suggestions for how to allow imexpire to run correctly via the scheduler?
    We're running ims 6 2005Q4:
    -bash-3.00$ ./imsimta version
    Sun Java(tm) System Messaging Server 6.2-8.04 (built Feb 28 2007)
    libimta.so 6.2-8.04 (built 19:28:07, Feb 28 2007)
    SunOS vmpm1 5.10 Generic_125100-10 sun4u sparc SUNW,Sun-Fire-V490
    David.

    dpelinka wrote:
    When imexpire runs at the scheduled time, it produces:
    [15/Nov/2007:22:01:00 -0800] vmpm1 imexpire[7946]: General Error: Could not get expire session lock. Possibly another imexpire is runningAre you sure another imexpire isn't running?
    Do you have coreadm enabled on your system and if so has any messaging server processes core dumped since you last restart messaging server?
    I found an imexpire.lck file and deleted it, but got the same error the next day. The imexpire.lck file is supposed to be there. Processes obtain a file-level lock on this file. If you run fuser /opt/SUNWmsgsr/config/imexpire.lck does it return a value?
    Next, I restarted messaging, then ran imexpire interactively with no problems. The imexpire.lck file remained and was not removed afterward. Our imexpire policy was migrated from ims5.2 and is housed in configutil. Can you give me any suggestions for how to allow imexpire to run correctly via the scheduler?You need to determine why the lock was left in the first place. Has it been working since you restarted messaging server i.e. do you see something like the following in your /opt/SUNWmsgsr/log/default log?:
    [17/Nov/2007:23:00:01 +1100] mailserver imexpire[26309]: General Notice: Expire
    started (0)
    [17/Nov/2007:23:00:01 +1100] mailserver imexpire[26309]: General Notice: Expire
    finished
    Regards,
    Shane.

  • Mobile Server Session lock

    Hello Guru's,
    Since last few days our MGP cycle is not finishing and everytime there is a transaction level session lock held by 2 different Mobileadmin user in our mobile server.
    After few hours we have to forcefully killed blocking SID and then only MGP cycle finishes on Mobile server.
    Does anybody had face the same problem on their if yes kindly can you please share your experience and how to resolve this issues.
    Few thechincal details:
    1. We are running windows server 2003 with Olite database 10.2.0.2
    Thanks,
    Nirms
    Message was edited by:
    rapchik301

    We are having probably the same problem (we run on linux).
    tends to be one of two issues
    1) table C$ALL_SID_LOGGED_TABLES has a level 6 lock by an INACTIVE mobile session. killing the inactive session allows processing to continue - SR raised with Oracle
    2) contention for C$ALL_CLIENT_ITEMS in setting the dirty flag for objects that need to be processed MAY result from multiple MGP threads attampting to process the same transaction, two different transactions in the in queue for the same user or user sync around the MGP processing, but reason not yet tracked down. We have switched to a single thread until we can identify the problem

  • Current Session Lock Entries

    Hi,
    I want to read the locked objects, which are locked in other sessions other than the current session.
    I don't need current session locking entries.
    I tried with fm ENQUEUE_READ but it is giving all locked entries including current sesstion.
    Any info on this.
    Thanks
    aRs

    Hi,
    I am facing the same sitauation but SM30 does lock by considering parallal sessions by same user.But it uses VIEW_ENQUEUE to check the locks.
    So SAP does tracks locks by sessions.I hope i am right here in saying this.
    Manish.
    Message was edited by:
            Manish Verma

  • Disable session lock screen

    when i awaken from a suspend to disk i don't want to have to log in....
    is there any way to disable it? i know this seems like a simple question... but help?

    im using kdemod and  maybe session lock was not the proper term...
    it's like a plasma login screen (it uses my plasma theme anyways) that forces me to log in. i mean i can still get in... it is just an annoyance.
    here is the ouiput:
    dmesg | grep resume -i
    Command line: root=/dev/disk/by-uuid/8d9b5e49-d8c2-40c1-974b-3c850ea10366 resume=/dev/sda8 ro
    Kernel command line: root=/dev/disk/by-uuid/8d9b5e49-d8c2-40c1-974b-3c850ea10366 resume=/dev/sda8 ro
    PM: Starting manual resume from disk

  • Character / Input corruption after session lock

    One of our larger customers has the following setup:
    Windows 2008 R2 Active Directory with 2x DC at a datacentre and 1x DC in their head office, 3x RDS servers in a DNS RR terminal server farm and a DC acting as a gateway server.  The end user accesses the RDS infrastructure via an external URL.
    The client PCs are Windows 7 x86 with bare minimum software.  All clients and servers are up to date with released Windows Updates.
    When a user logs into the RDS and leaves their computer, it locks after a certain amount of time.  If they unlock their computer all appears well, but when they unlock the RDS session, they invariably see character corruption which means the password
    is incorrect and they are unable to log in.
    There is a workround by users pressing ESC a few times or disconnecting and reconnecting, however a proper resolve to this issue is requested.
    Any ideas what is causing this and how I can go about troubleshooting?

    Hi,
    Thank you for posting in Windows Server Forum.
    Did you receive any specific error for your case?
    Are you passing your RD Web Server through RD Gateway?
    Does this issue occurs for all users or specific user?
    There is one Hotfix for slightly different scenario if you are passing your server through RD Gateway. Please install if it applicable and check the result.
    The Remote Desktop Gateway service incorrectly blocks a user account whose name contains localized characters in Windows Server 2008 R2
    http://support.microsoft.com/kb/2578133
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Blocking session Locks

    Hi,
    Need some assistance...!
    For the last few weeks i was getting the blocking session alerts and when i checked out for what the blocking session is doing, i found some select or insert or pl/sql line of code is getting executed. but the thing is i have observed the blocking is done on the same table each time.
    Any suggestions how i can proceed further ? why the lock is getting on the similar table.
    Regards,
    Sunila

    About code examination, you could check the detailed SQL statements:
    - INSERT should only block if another INSERT is run on the same table with the same primary key and in this case the second INSERT statement will fail due to duplicate key.
    - SELECT can only block if SELECT with FOR UPDATE clause is used and in this case all rows returned by the SELECT (for a single table SELECT) are locked. SELECT without FOR UPDATE clause does not block.
    If not already done, see How Oracle locks data.

  • Two forms sessions locking

    Hi guys i am having a problem with users locking a table in Oracle forms but when i try it in SQL it happens here too. I wondered if anyone can shed light on this?
    I have posted in SQL and forms forums as not sure which is correct place!
    I have created two scenerios one that works and one that doesnt based on primary key and foreign key constraints(but the one that works is not possible for us as it would mean changing table design which we cant do) .
    I have hard coded in numbers 1127,1128 to make it easier (in reality this is a sequence)
    ok scenerio one (our scenerio)
    two tables
    CREATE TABLE testSFLABPR
       (     LABP_REF_IRN VARCHAR2(25 BYTE),
         LABP_REF_REF VARCHAR2(30 BYTE),
         LABP_REF_SL NUMBER(8,0),
         LABP_CONFIG_ID NUMBER(8,0),
          CONSTRAINT PK_testLABPR_IRN_SL PRIMARY KEY (LABP_REF_IRN,LABP_REF_SL)
    CREATE TABLE testSFLABP
       (     LABP_IRN VARCHAR2(25 BYTE),
         LABP_OPNO NUMBER(3,0),
         labp_no NUMBER(8,0),
          CONSTRAINT PK_testSFLABP PRIMARY KEY (LABP_IRN, LABP_OPNO, LABP_NO) ENABLE,
          CONSTRAINT testFK_SFLABP_SFLABPR FOREIGN KEY (LABP_IRN,labp_no)
           REFERENCES TESTSFLABPR (LABP_REF_IRN,LABP_REF_SL) ENABLE
       ) ;ok now session one does the following
    DELETE FROM      testSFLABPR     WHERE   LABP_CONFIG_ID            = 1127;          
    INSERT INTO testSFLABPR(
            LABP_REF_IRN,
            LABP_REF_SL,
            LABP_REF_REF,
            LABP_CONFIG_ID
            VALUES
            'SOPENSHELVING',
            1127,
            1127||'CF Route',
            1127
    INSERT INTO testSFLABP
          LABP_IRN,
          LABP_OPNO,
          LABP_NO)
    VALUES (
    'SOPENSHELVING',
    1,
    1127);session one is left in this state.
    session two now does the following
    DELETE     FROM testSFLABPR     WHERE   LABP_CONFIG_ID            = 1128;     session two is now locked until a commit or rollback takes place.
    If i run the exact same scenerio with only one primary key on the table no locks take place
    CREATE TABLE testSFLABPR
       (     LABP_REF_IRN VARCHAR2(25 BYTE),
         LABP_REF_REF VARCHAR2(30 BYTE),
         LABP_CONFIG_ID NUMBER(8,0),
          CONSTRAINT PK_testLABPR_IRN_SL PRIMARY KEY (LABP_REF_IRN)
    CREATE TABLE testSFLABP
       (     LABP_IRN VARCHAR2(25 BYTE),
         LABP_OPNO NUMBER(3,0),
         labp_no NUMBER(8,0),
          CONSTRAINT PK_testSFLABP PRIMARY KEY (LABP_IRN, LABP_OPNO, LABP_NO) ENABLE,
          CONSTRAINT testFK_SFLABP_SFLABPR FOREIGN KEY (LABP_IRN)
           REFERENCES TESTSFLABPR (LABP_REF_IRN) ENABLE
    INSERT INTO testSFLABPR(
            LABP_REF_IRN,
            LABP_REF_REF,
            LABP_CONFIG_ID
            VALUES
            'SOPENSHELVING',
            1127||'CF Route',
            1127
    INSERT INTO testSFLABP
          LABP_IRN,
          LABP_OPNO,
          LABP_NO)
    VALUES (
    'SOPENSHELVING',
    1,
    1127);
    DELETE     FROM testSFLABPR     WHERE   LABP_CONFIG_ID            = 1128;I hope i have posted all information that is relevent.. db version were on is Oracle Database 10g Release 10.2.0.3.0 - Production
    Any help is much appreciated..

    You need to add index on all FK columns:
    CREATE INDEX xxx ON TESTSFLABP
    (LABP_IRN, LABP_NO)

  • Translucent impromptu possible "hacker" message interrupts current session, locks MacBook Pro screen and demands that I restart by holding down the power button of my LapTop to turn it off first. Any thought? Could this be another way to mess with us?

    I was listening to a YouTube video on the history of X15 rocket airplanes. All of sudden, out of the blue a translucent back message drops top down, stops the video, locks up my MacBook Pro screen and demands that I restart my lapTop by first holding down my power switch, then turn the lapTop back on. This has never happened to me before. The message was in black & white, and in about 6 languages: English, French, Spanish, Dutch, Japanese, Chinese. Does any one recognize what this might be?
    The Computer turned back on just fine as if nothing had Now I am freeking out that they could be reading my key strokes or something. Could they have used this tactic to install malicious software on my computer by first taking away my ability to do anything about it being that I am not a software engineer? Can any one think of anything simillar? I reported this as a bug to APPLE the regular way, then cleared my Safari cookies, then run software update which returned nothing new as in " your software is up to date at this time."
    Can any one please help?
    A-NmN. 

    Hi stedman1,
    Thank you so much. This seems to make sense to me now. I was freaking out a bit that some hacker could be messing with my MacBook Pro. I will be monitoring this issue from now on as it has never happened before. 
    A-NmN.

  • Killing all sessions at once who are locking the objects

    Hello all,
    i am working in 9i Oracle RDBMS on AIX IBM OS
    most of the time we face locking issue and there comes more then different 50 sessions which locking different tables.
    here is my script to find out what sessions are locking what tables.
    set lines 200
    set pages 50000
    col SID for 99999
    col SERIAL# for 999999
    col username format a12
    col sql format a55
    col event format a50
    col program format a40
    col MINS for 9999
    col ID1 for 999999
    col object_name for a35
    col locktype for a8;
    select  /*+ ORDERED */ s.sid,s.serial#,s.status,round(s.last_call_et/60) MINS,s.program,l.ID1,d.object_name,d.object_type,l.type as locktype
    from v$lock l,v$session s, dba_objects d
    where l.sid = s.sid
    and l.ID1 = d.object_id
    and s.username = 'MULDMS'
    and last_call_et > 120 and l.type <> 'TX' order by s.status,MINS,l.ID1,l.type; and the out put it gives something like
      SID SERIAL# STATUS    MINS PROGRAM                                      ID1 OBJECT_NAME                         OBJECT_TYPE        LOCKTY
    8981    1069 ACTIVE       2 frmweb@Appsdms31 (TNS V1-V3)               30407 VH_BTN                              TABLE              TM
    1642     512 ACTIVE      15 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
      690    1057 ACTIVE      17 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
      699    1787 ACTIVE      17 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
      690    1057 ACTIVE      17 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
      690    1057 ACTIVE      17 [email protected] (TNS V1-V3)    30643 VT_CHECK_INOUT                      TABLE              TM
    10877     895 ACTIVE      18 [email protected] (TNS V1-V3)     28846 AM_DOCS                             TABLE              TM
    6654    1085 ACTIVE      18 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    1912    1655 ACTIVE      18 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    10877     895 ACTIVE      18 [email protected] (TNS V1-V3)     30407 VH_BTN                              TABLE              TM
    6654    1085 ACTIVE      18 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    1912    1655 ACTIVE      18 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    1754    1582 ACTIVE      18 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    10877     895 ACTIVE      18 [email protected] (TNS V1-V3)     30643 VT_CHECK_INOUT                      TABLE              TM
    6654    1085 ACTIVE      18 [email protected] (TNS V1-V3)    30643 VT_CHECK_INOUT                      TABLE              TM
    10708     982 ACTIVE      19 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    5428     855 ACTIVE      19 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    10708     982 ACTIVE      19 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    5428     855 ACTIVE      19 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    10278     897 ACTIVE      20 [email protected] (TNS V1-V3)     28846 AM_DOCS                             TABLE              TM
    6261    1056 ACTIVE      20 frmweb@appsdms12 (TNS V1-V3)               28846 AM_DOCS                             TABLE              TM
    6598    1413 ACTIVE      20 [email protected] (TNS V1-V3)     28846 AM_DOCS                             TABLE              TM
    1312    1000 ACTIVE      20 [email protected] (TNS V1-V3)    28846 AM_DOCS                             TABLE              TM
    10278     897 ACTIVE      20 [email protected] (TNS V1-V3)     30407 VH_BTN                              TABLE              TM
    6261    1056 ACTIVE      20 frmweb@appsdms12 (TNS V1-V3)               30407 VH_BTN                              TABLE              TM
    1312    1000 ACTIVE      20 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    3521     717 ACTIVE      20 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    6598    1413 ACTIVE      20 [email protected] (TNS V1-V3)     30407 VH_BTN                              TABLE              TM
    6598    1413 ACTIVE      20 [email protected] (TNS V1-V3)     30643 VT_CHECK_INOUT                     TABLE              TM
    1312    1000 ACTIVE      20 [email protected] (TNS V1-V3)    30643 VT_CHECK_INOUT                   TABLE              TM
    9131    1002 INACTIVE     2 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
    4887    1040 INACTIVE     2 [email protected] (TNS V1-V3)     30455 VH_PSF                              TABLE              TM
      151    1982 INACTIVE     2 [email protected] (TNS V1-V3)     80224 RD_ENQEXD                           TABLE              TM
      846     988 INACTIVE     3 [email protected] (TNS V1-V3)    29228 GM_VIN                              TABLE              TM
    5364    1149 INACTIVE     3 [email protected] (TNS V1-V3)    30407 VH_BTN                              TABLE              TM
    9934     789 INACTIVE     3 [email protected] (TNS V1-V3)     30455 VH_PSF                              TABLE              TM
    7511    1092 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
    3595    1104 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
      846     988 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TM
      945     670 INACTIVE     3 [email protected] (TNS V1-V3)    30455 VH_PSF                              TABLE              TMand then i have to kill the session one by one . thaat is a tedious task to do.
    i want to modify this script which will give me all the kill statement and i just have to run it
    can someone help me in this regard as i am weak in sql/plsql
    thanks and many thanks

    >
    i want to modify this script which will give me all the kill statement and i just have to run it
    >
    Karthick's script will 'kill' the sessions but before you use that script you may want to read the docs about the KILL and DISCONNECT clauses.
    See the DISCONNECT SESSION and KILL SESSION clauses in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_2013.htm#sthref4724
    >
    DISCONNECT SESSION Clause
    Use the DISCONNECT SESSION clause to disconnect the current session by destroying the dedicated server process (or virtual circuit if the connection was made by way of a Shared Sever).
    The IMMEDIATE setting disconnects the session and recovers the entire session state immediately, without waiting for ongoing transactions to complete.
    KILL SESSION Clause
    The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions, release all session locks, and partially recover session resources.
    IMMEDIATE Specify IMMEDIATE to instruct Oracle Database to roll back ongoing transactions, release all session locks, recover the entire session state, and return control to you immediately.
    >
    For DISCONNECT the IMMEDIATE clause will recover the session state 'immediately'.
    Using KILL, even with the IMMEDIATE clause, you are telliing Oracle to roll back any ongoing transactions and that can take a lot of time.
    Make sure you are really doing the operation you want to do. If you want to get the locks released immediately you need to use 'DISCONNECT IMMEDIATE'.

Maybe you are looking for