Database records Locking Problem

hi all,
I had a web page in which i had a pop up window, thru which i ll
display some list of values, where the user can select the multiple
records. Once he selects them,the records gets locked (by updating
those rows with session id), they gets populated in the parent
window, then he can perform some other operation, then the commit/rollback operation takes place.
The problem is once the records are populated in the parent window,
there is a chance to close the window, which causes the rows to get locked.
(i mean connection is not closed).
If the user tries to open the same window again, it never gets opened up,
as the records being locked already. And i do even have a way to find the unclosed connections to close them
please anybody can suggest a good solution for this problem?

hi duffymo,
Yah, you are correct, but the problem is not with the closing of pop up window.
The problem is with the closing of main window.
In the popup window, I have a button to select records, which causes
the records to get locked and the pop up to gets closed and the records get populated in the main window.
could you suggest something, so that i could communicate the closing event
to the server. I think IE dont have any event of window closing. So what I have to do?
Or atleast can I do something like, blocking window closing and the user has to click on logout button, there I can close the connection.
thanks & regards
srinivas.M
.

Similar Messages

  • JavaScript error and CATW record locking problem

    Hello,
    We're having two problems with ESS (CATW and Personal Information (PZM3)) in EP 6. We have an ITS-R/3 landscape.
    The JavaScript problem appears intermittently within Personal Data services (Address, Emergency Contact, ...). The actual error reads "object required" and originates from ITS. A user may be able to click through all the ESS services once fine, but on a second click receive the error. Sometimes they can't use the services at all.
    The record locking problem happens in Time Sheet (CATW). Even though a user Saves and Releases the Time Sheet, it remains locked and cannot be approved. Alternatively, some users are experiencing locked records when they try to complete their own time sheets.
    I'm not sure if these are related.
    Has anyone here seen these problems? Any suggestions are most welcome!
    Cheers,
    Colleen

    The best way to nail down the javascript error would be to use the firefox JavaScript debugger extension plugin and put the breakpoints where the problem occurs.
    This will exactly tell you which object it is looking for which is not found. Moreover you might be able to find that when it is working fine as you said. So give that a try and I am sure you will be able to figure out the problem.
    To me this mostly looks like at time some .js file is not coming through to the browser... but this is just a wild guess based on the symptoms.

  • Database locks problem

    Hi,
    We encounter blocking locks within our applications on a frequent basis. We have various ways of detecting these but when we have locks we cannot see them via EM Grid Control.
    We navigate to <Database> - Performance - Database Locks - Blocking Locks - there are none displayed even though we know there are blocking locks.
    This is happening on a number of databases, all of which are 8.1.7.4.
    There are no error messages displayed in the Grid Control console - it draws the locks screen fine - but just displays no results.
    In the emoms.trc file we can see errors relating to locks and javanullpointer exceptions (see output below).
    Has anyone else had this problem?
    Any help appreciated.
    Thanks,
    Steve.
    Output from emoms.trc:
    [EMUI_13_45_56_/console/database/instance/lock] ERROR em.MetricEngine getMetricResult.1026 - MetricCollect
    orTarget[MetricCollector:LOCK_THREAD302:30] unable to get cached data for metric
    BLOCKING_LOCKS against target YBSL: java.lang.NullPointerException
    java.lang.NullPointerException
    at oracle.sysman.emo.perf.metric.rt.DbLockManagerQuery.getData(DbLockManagerQuery.java:316)
    at oracle.sysman.emo.perf.metric.rt.DbBlockingLocksQuery.getData(DbBlockingLocksQuery.java:72)
    at oracle.sysman.emSDK.emd.rt.MetricCollectorThread.getMetricResult(MetricCollectorThread.java:971)
    at oracle.sysman.emSDK.emd.rt.MetricCollectorTarget.getMetricResult(MetricCollectorTarget.
    java:534)

    Hi;
    Recently i have many (apps) user locks in my database . Any problem happen my database ?Which user? Seeded or customs? If one user locked which mean that user cant login database any more. Did you check those user end date?
    Can i kill that Inactive (apps) users manually ? If one session is İnactive it doesnt meant it can be not active anymore. Please see:
    session is still Alive-How to find the DB session is still Alive
    How to find the DB session is still Alive
    Regard
    Helios

  • Forms 6i : Ole Container : Locking problem

    We have a form in which user can attach all sorts of documents that are then saved in the database.
    Once in a while we have a locking problem; when 2 users try to open the same document, the second one first gets a 'Could not reserve record (2 tries). Keep trying?'. When clicking 'No', the next error message is 'Frm-40501 : unable to reserve record for update or delete', and the form cannot be used anymore. He keeps complaining about the reserved record.
    I've been looking into this problem but cannot seem to find a lot of help.
    Does anyone have an idea how to solve this locking problem?
    I have tried the following things:
    * setting the block to locking mode 'Delayed' => we ended up having duplicate records.
    * Changing properties of the ole-container (In Place Activation, Inside Out support, ...).
    Forms version is 6.0.8.13.0, database 8.0.6.0.0.
    Any help is appreciated.

    that seems to be a normal locking problem. Do you have tried to work with an ON-LOCK trigger ? (e.g. first to see, when locking will occur, second for implementing an own locking-behaviour, maybe with a SELECT for UPDATE)
    Or do you think, that there is something special with your OLE-programming ?
    Gerd

  • Record locking

    How does Oracle 8i handle record locking?
    Is this handled completely in the background by oracle or are there explicit record locks that can be set.
    I understand that an update or insert will lock the current record and the commit and rollback will release the lock.
    I have a problem where some developers are using an odbc connection to access an oracle database while a java servlet app is accessing the same database using jdbc. At times the changes made through the servlet app are rolled back or are not processed and the changes made by the odbc connection are kept.
    I am confused as to how this could happen.
    any suggestions?

    I have a simmilar problem, where my program aborts too often with a record Lock.
    Everytime I do an update/delete I do it using the SELECT .... FOR UPDATE NOWAIT. In order to reduce the number of aborts due to record locks I'd like to try your suggestion of catching the ROW_LOCKED error, sleep(dbms_lock.sleep in PL/SQL), and retry getting the lock a certain amount of times prior to erroring out. Can You give me more details of how to do this.
    In paticular how do you use dbms_lock.sleep function/package? where can I find this package? Can you share any code examples where you have used this package.
    I greatly appreciate all teh help/suggestions you can provide to me.
    Thanks.

  • Transaction Locking Problem in JDBC with ResultSet : ORA-17090.

    I have a locking concern using JDBC. I select a set of records to determine if they
    need to to be updated by a set of generated results (from else where in the program).
    If the results are not in this cursored set of records selected they are to be INSERTED
    else they (if they are in the select set) they are to be UPDATED.
    I set up a ResultSet using concurrancy parameters so that I can scroll through them for
    each of the program results to check. If I set up the ResultSet with TYPE_SCROLL_INSENSITIVE,
    CONCUR_UPDATABLE, I get a possible race condition if I am accessing teh same records
    through some other program such as toad. As such the first record is not checked (if my
    cursor in toad is on this first record) and as such is duplicated.
    If I set up the ResultSet with TYPE_SCROLL_SENSITIVE, CONCUR_READ_ONLY. This fixes this
    concurrancy problem but occassionally I get the following error which is Oracle based and
    not documented:
    java.sql.SQLException: operation not allowed: Unsupported syntax for refreshRow()
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:251) at
    oracle.jdbc.driver.SensitiveScrollableResultSet.refreshRow(SensitiveScrollableResultSet.java:171)
    at oracle.jdbc.driver.SensitiveScrollableResultSet.handle_refetch(SensitiveScrollableResultSet.java:239)
    at oracle.jdbc.driver.SensitiveScrollableResultSet.next(SensitiveScrollableResultSet.java:83)
    at sfwmd.hisa.oneflow.TimeSeries.load(TimeSeries.java:2502)
    at sfwmd.hisa.oneflow.OneParameter.main(OneParameter.java:808)
    which translates to an ORA-17090 (operation not allowed)
    {NOTE: I do NOT call ResultSet.refreshRow() anywhere in my program}
    I do not see any methods in ResultSet for record locking, outside of the mentioned parameters
    in the constructor. The database (updates and inserts) changes are all batched and executed
    AFTER this ResultSet is released.
    -James Fox
    [email protected]

    post ur code..

  • Address Book database is locked?

    Hello,
    I'm having a constant problem when trying to sync (using MySync): the sync services engine says that mingling failed and looking at the log I see:
    <pre>
    2006-06-21 09:09:59.357 SyncServer[216] NSGenericException: error 5 executing 'pragma synchronous=normal': database is locked
    2006-06-21 09:09:59.358 SyncServer[216] ISyncManager caught exception NSGenericException trying to open truth record store at /Users/schmitta/Library/Application Support/SyncServices/Local. Reason: error 5 executing 'pragma synchronous=normal': database is locked
    2006-06-21 09:10:00.877 AddressBookSync[227] AddressBookSync (client id: com.apple.AddressBook) error: Exception running AddressBookSync: Session <ISyncConcreteSession: 0x35ea30> cancelled. SyncServer failed to merge the changes from some clients: NSGenericException error 5 executing 'pragma synchronous=normal': database is locked
    </pre>
    So it seems that my address book database is locked. I tried rebooting both machines, but it did not do anything.
    Anybody knows how to unlock an address book database?
    Thanks a lot.
    PowerMac G5 2x2GHz   Mac OS X (10.4.1)  

    Thank you for the suggestion, I'll try it. (The new user account thing might be difficult as I'll have to tell MySync to synchronize accounts with different names.)
    The strange thing is that this started happening with two machines at the same time.

  • Record locks created when user closes the Browser and not the Web Form

    Hi. We sometimes encounter the issue where a user updates a record, locking the record on the table, but then they unexpectedly closes the browser without saving by clicking the X in the upper-right of the browser window. Then when another user comes along and attempts to edit that record they get the message Unable to Reserve Record. The orphaned record lock eventually does seem to clear itself out, but that can often take 15-20 minutes.
    Is there any way to speed this up? Or to pragmatically keep this from occurring? Either on the database side or with some code in a particular application?
    Please let me know your thoughts. Thanks in advance.

    If a user closes the browser window the forms runtime on the application server holding the locks is in most cases still up and running. The FORMS_TIMEOUT controls on how long a forms runtime on the server is up and running without the client applet not sending a heartbeat (See MOS note 549735.1). By default this is 15 minutes which would explain your locks being held 15 minutes.
    You could decrease the FORMS_TIMEOUT in the default.env, so the forms runtimes get cleaned earlier and thus the locks get released earlier.
    Note that if you have blocking client_hostcalls with webutil this might be a problem, as it prevents the forms applet from sending the heartbeat and after the FORMS_TIMEOUT passed while the forms applet is blocked the forms runtime on the server gets closed.
    cheers

  • Record Locks

    Hello all,
    Now this might sound like a very beginners question but here goes.
    I have been programming in Java for over 2 years so I understand the basics of JDBC. Now I just started a job and am trying to develop an application for the client. First of all what is a record locking? I am using Oracle 9i as a database. This application will be placed on a server in a directory where clients will access it. What I want is once a user is modifying a record on a MODIFYDIALOG others should not be able to read/add/modify it. Somehow this is not working correctly. Database object property to use transactions is set to true and the level i am using is "SERIALIZABLE". But I am unable to achieve my goal of record locking. I was able to solve all the other problems that i came across by visiting the previous posts but this one is really out of hand here.
    I know this is a very childish question but I will be really thankful if someone can explain it to me and tell me what and how to do it.
    Regards

    Did you look at these?
    http://onesearch.sun.com/search/developers/index.jsp?col=devforums&qp_name=Java+Database+Connectivity+%28JDBC%29+%26+Transactions+%28JTA%2FJTS%29&qp=forum%3A48&qt=%2Boracle+%2B%22record+locking%22

  • How to output database record in .doc format?

    Good day to all of you! I want to output the database records to a formatted .doc document.For example,
    Here are the db records:
    firstname mid lastname age
    ryan g gomez 23
    shiela m vanilla 21
    and the created document will be a .doc file, which will be formatted with image etc...
    +"File for the first record let's say RyanGomez.doc"+
    h4. Company Logo || Company Name
    h4. -------------------------------------------------------------------------------------------------------
    First Name: Ryan Middle Intial:G Last Name:Gomez
    +"and a separate file for the second format.. and so on...til all the records are created"+
    h4. Company Logo || Company Name
    h4. -------------------------------------------------------------------------------------------------------
    First Name:Shiela Middle Intial:A Lastname:Vanilla
    I know that I need Bufferedwriter/reader or printwriter but I'm having a problem on how to format or edit the output ...any help regarding this?
    I have tried using iText but I think it can only output pdf file...I need a doc output file.

    try {
            // Create a statement
            Statement stmt = connection.createStatement();
            // Prepare a statement to insert a record
            String sql = "DELETE FROM my_table WHERE col_string='a string'";
            // Execute the delete statement
            int deleteCount = stmt.executeUpdate(sql);
            // deleteCount contains the number of deleted rows
            // Use a prepared statement to delete
            // Prepare a statement to delete a record
            sql = "DELETE FROM my_table WHERE col_string=?";
            PreparedStatement pstmt = connection.prepareStatement(sql);
            // Set the value
            pstmt.setString(1, "a string");
            deleteCount = pstmt.executeUpdate();
            System.err.println(e.getMessage());

  • Database column alias problem

    When joining the firstname and surname fields in my inital SQL query of my interactive report i.e
    INITCAP(INDSNAME)||' '||INITCAP(INDFNAME) AS FULLNAME,
    When clicking through to the record detail page I am getting the following error from the page item where in the source I am specifying FULLNAME under Source value or expression
    Column FULLNAME not found in table MYTABLENAME
    How can I get around this?
    Many Thanks

    Hi Bas
    Thanks - it will just be a view as basically I just want to print the data via jasper
    In my IA report under column attributes there is one called FULLNAME which is derived from INITCAP(INDSNAME)||' '||INITCAP(INDFNAME) AS FULLNAME,
    So how can I get the data displayed in the FULLNAME column in the IA report into a single record view.  At the moment my IA report the Link Column is currently linked to a 'Link to custom target'
    the target is a 'Page in this Application'  in this case page 9
    and in Item1 under Name the value is P9_ROWID and the value is #ROWID#
    Database column alias problem 

  • Layout for editing database record

    Hi!
    I'm trying to make a JPanel display a database record for editing in a nice way, but I'm kinda stuck. Example:
            Id: 10
    First name: Peter
    Last name: Johnson
           Age: 20 and so on. The problem is that I don't know what strategy to use for the layout management, so that it looks good. I use JLabel for all labels and the Id number, since it's not editable, and JTextField s for the other data. I want the labels for the fields right aligned and the textfields left aligned "in their container", so that there is a streight line between the :s. (I hope you understand...)
    Any help appreciated!
    /Jan

    Thanks!
    The missing link was the FlowLayout.RIGHT constant. I guess I hadn't done my homework.
    Thanks for pointing that out!
    /Jan

  • Reg database logical locks

    hii all,
         I want to keep locks(logically) to the existing database records as my ztables(3 tables with 1 parent table,containing header data and 2 line item tables having the foreign key relationships with header table) are accessed at time by many users(different users might try to change the same record).what is the best way to go ahead.
    with regards,
    sandeep akella.

    Hi,
    check the following link
    http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm
    Regards,
    Madhu

  • Displaying Zero Value in a Chart if there exist no database record.

    Hello All,
    I need to create a chart that displays the number of jobs per hour over a 24 hour period. I can determine the hour the job was created and I have no trouble making a chart with a count of jobs per hour. The problem is that I also want to display the hours that have no jobs on the chart. So in the hours where no job is created there is no database record.
    So inorder to show it in a chart  Zero values for a particular hour....how shd it be done if there is no zero values in the database  for a particular hour???? we dont have the flexibiltiy to  add a further table in the database..
    Any suggestions would be much appreciated.
    Thanks
    Regards
    Atul

    This is basically the same issue that is covered [here|Record selection issue in cross tab.;.
    HTH,
    Carl

  • Table rows lock problem

    Dear Oracle Tech.
    As end user of Oracle Database, we seek advise from Oracle on the following issue :
    Our business application is an OLTP system and currently we have an adhoc batch process that needs to be executed. This batch process mirrors a normal online user process in the way some tables are updated on the database. Our concern arises when our customer requested to run the batch process during normal office hours which actually is not the norm. We would like to have your opinion on running batch update process during normal office hours, are there issues of lock contention and risk of deadlock? We understand Oracle databases have lock mechanisms built into it but is there a risk of the deadlock situation arising if we do execute the batch process during normal office hours? And if deadlock does occurs, how easy is it to detect and resolve the deadlock and return the application to normal operation?
    Our database is Oracle 7.3.4 running on Solaris 2.6 over a network, our online application is built with PowerBuilder 7 and running on Windows95 clients.
    Thank You.

    I have a related problem and thought that one of you might be able to help me. I am relatively new to JDBC.
    My code is very similar to Alex' except that the queries are simpler (what does 'FOR UPDATE' do?).
    con.setAutoCommit(false);
    con.setTransactionIsolation( Connection.TRANSACTION_REPEATABLE_READ);
    query1:
    select * from table_bla where a=b
    query2:
    update table_bla set ... where a=b
    The problem is that in between these 2 queries, the new rows get inserted into table_bla that satisfy a=b. Consequently, these rows get updated by query2, even though they haven't been retrieved by query1.
    How do I synchronize this, so that nothing can be inserted into table_bla until my block of queries is executed (or how can I ensure that only the stuff that was retrieved by query1 is updated in the table)?
    Help much appreciated.
    Thanks!
    Sladjana

Maybe you are looking for

  • Apex_item.hidden does not appear to be working correctly

    Hi, I am trying to build a manual MRU form based on the How to tutorial by Christina Cho. The differences are that I am using Apex 2.2 and thus apex_item functions and that I am putting the insertion row first before the existing rows (I want most re

  • I can't update Yosemite 10.10.1 to 10.10.2

    I can't update from 10.10.1 to 10.10.2 not with the app store or the stand alone dmg. It keeps showing that I have an update in the app store but it won't download or install.Any help will be appreciated. Thank you.

  • IMessage failed to deliver

    I have been having imessage problems since ios 7 upgrade. I send a message to people whom I know have I message turned on. It says failed to deliver with a red exclamation point. So I'm forced to send as a text. They def have imessage on. I have  reb

  • Help!! please email setup requesting enterprise activation after factory reset

    after i did a factory reset i notice my email set up is requesting enterprise activation email and password i don't have either so now my email setup can't work unless i do it and my native browser won't connect and blackberry protect won't work. i r

  • How to Install OC4j in linux

    Hi all.. I am novice user of Linux Platform... I wanted to install oc4j under linux.. The Staps in followed .. 1.. i have installed jdk 1.3.1 linux version 2.. i have unzipped to ,zip file after this i have set the path but duuno how to set the class