Updating single row by multiple users at the same time

Hi,
I have been asked to develop an application where a single row from a table will be accessed by multiple users. Even multiple users can try to update the same row at the same time. So, to provide a solution of this problem should it be the best way to lock that particular row when user requesting to update it and after completion of commit the lock will be released. In the same time if some other user request to update the same row then it will be in the wait condition.
Please provide suggestion that is it the best way to handle the situation or not. If it is then can you also please provide an example (with sample code) of it.
Regards,
Koushik

It depends entirely on how the system was built.
You could relatively easily build an application that does something like
- Select a row with as last_updated_date column
- Update the row specifying the last_updated_date you had selected in your WHERE clause
- If the update updates 1 row, it was successful, otherwise inform the user that the row was already updated.
In this case, the second user would get an error indicating that the seat had already been purchased.
You could also relatively easily do a SELECT FOR UPDATE to prevent users from ever getting an error between the time they select a seat and the time they finish their transaction. Of course, if the user wanders away from the computer, or inadvertently ends up locking dozens of rows, this tends to rather problematic in practice. You may find that when the train pulls out of the station, someone that never ended up buying a ticket has locked a dozen rows so you lost a dozen sales. If you have a call center where operators are reserving seats for people on the phone, you may decide that explicit locking is more appropriate because you're confident that the operators aren't going to leave tickets locked for long periods of time and the cost of having the customer walked through the seat selection process multiple times would be higher than the cost of having rows locked longer than they need to be.
Justin

Similar Messages

  • How to support multiple users at the same time?

    Hi all,
    I have a Labview software which controls a analyzer via GPIB connector. When user A is using the software, user B has to wait until A is done. But actually, the analyzer is not very busy, when user A is using the software.
    I want user A, B, C and D can use the software at the same time. just like we can open Multiple websites at the same time.
    How can I program the software, so that the software can be open multiple times? Do you have any example?
    Thanks a lot.
    Steven
    Solved!
    Go to Solution.

    Are all the users going to be measuring the exact same thing from the same instrument?
    It would be possible to write a separate instrument server application that would handle all the direct interactions with the instrument. When one of the users needed to access the instrument, they would gain access to it through this server.
    The big, Big, BIG caveat is that each interaction with the instrument would need to be atomic. In other words each access would need to configure the instrument, initiate the reading, report the results, and then reset the instrument back to some known default value.
    As Dennis said, not a trivial process, but probably do-able...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Import PST files for multiple users at the same time?

    While importing PST files into archive mailboxes, the Exchange 2010 mailbox server went to 100% CPU and memory usage and I could not stop the imports because the EMS stopped responding.  We had to restart the whole server to get back to normal.
    Not sure if importing PSTs was the cause of it it was a coincidence.  We have done imports the same way before without this issue.
    How many PST imports can be done at the same time and how do we queue up multiple users and have the mailbox imports have unique names for each user?  I noticed they are always called MailboxImport and MailboxImport1 and then it starts over as MailboxImport
    again for additional users. So, if more than one user's PSTs are being imported at the same time, we will have multiple identically named imports running.
    We would like multiple users' PST imports to queue up and start automatically when the previous users' imports complete.

    Please try like this. Rename folder name same as alias.  i.e. \\server\share\<alias>. below are examples.
    "\\server\share\jsmith"
    "\\server\share\tjones"
    "\\server\share\rsmith"
    "\\server\share\bspears"
    "\\server\share\mmouse"
    And run below command to take PST from the corresponding
    foreach ($i in (Get-Mailbox)) { New-MailboxImportRequest -Mailbox $i -FilePath "\\Server\share\$($i.Alias)\$($i.Alias).pst" -baditemlimit 50 -acceptlargedataloss ;while ((Get-MailboxImportRequest -mailbox $i | ? {$_.Status -eq "Queued" -or $_.Status -eq "InProgress"})) { sleep 180 } }
    If a folder missing with the alias you will see an error similar to this.I think this will work for you. You just keep only the required PST folders to import in the "\\Server\share" folder. 
    "Unable to open PST file '\\server\share\mmouse\mmouse.pst'.
    Error details: Could
     not find a part of the path '\\server\share\mmouse\mmouse.pst'.
        + CategoryInfo          : NotSpecified: (0:Int32) [New-MailboxImportRequest], RemotePermanentException
        + FullyQualifiedErrorId : 27802833,Microsoft.Exchange.Management.RecipientTasks.NewMailboxImportRequest"
    Thanks, MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Outlook autocomplete cache stops working for multiple users at the same time

    Hi there
    Ever since we upgraded our Exchange 2010 to Exchange 2013 we have had problems with the autocomplete cache in Outlook 2010.
    We have 700 users and about once per week I get a call about the autocomplete cache. A few users are on cached mode, but most use online mode. The problem appears on both, but it can usually be corrected by /cleanautocompletecache.
    Granted, the autocomplete cache gets corrupted sometimes, but it seems to happen a lot for us. I have noticed that often more than one user experiences the problem at the same time, and, since the problem starting after upgrading Exchange, I suspect that
    the issue is with Exchange and not Outlook. Yesterday three users complained about the cache at the same time.
    I know how to get a broken cache going again - that is not the issue. The issue is keeping this from happening so often.
    Anyone out there able to help?
    Thanks!
    /Anders

    Hi ,
    Based on my knowledge , when you tried to send an email to a recipient in the same exchange organisation then the recipient address will be resolved in to legacy dn value and then that email will be delivered to destination mailbox by pointing towards to
    that legacy dn value.
    For the external recipients exchange user the smtp address to get it delivered.
    For your issue :
    Based upon the NDR message , we need to covert those values in to x500 format and add it to respective recipient mailbox as an x500 address.Then These erorrs will happen if the x500 value of the destination recipient is not available on it's maibox
    and that would be the cause of the NDR for most of the times.Some time as you said autocomplete cache would get corrupted on the client end but it is very rare.
    How to convert NDR to x500 address format :
    http://msexchangeguru.com/2012/03/15/x500/
    How to avoid getting such kind of NDR'S :
    https://www.simple-talk.com/sysadmin/exchange/exchange-e-mail-addresses-and-the-outlook-address-cache/
    In case if you don't want the users to use the autocomplete cache when composing the new emails :
    In group policy we can use the  office templates to disable the below mentioned option.
    1.use autocomplete to suggest the names ---> this option will comes under the advanced settings on the outlook client.
    In case if you don't want the users to use the autocomplete cache when composing the new emails as well as if you wanted to delete that autocomplete then you need to choose one more option along with the first one.
    1.Empty autocomplete cache.
    Please reply me if anyhitng is unclear.
    Thanks & Regards S.Nithyanandham

  • Can I assign a Manager to a group, or to multiple users at the same time?

    Our company uses Connect to manage internal training. At the moment, if a Manager moves on, I have to manually change the assigned Manager of each user, one at a time.
    Trouble is that I am responsible for over 5000 users and each Manager is responsible for over 100 users, which makes this task a lengthy one.
    Help

    Hello B,
    Are you acquiring with all 8 channels?  If not, you can use one of your unused channels as an analog trigger source, and input your digital trigger there.
    Alternatively, the PCI-5105 has a RTSI connector on the rear of the board.  This connector gives you access to 8 digital RTSI lines which can be used for digital triggering.  See the following KB for more information about RTSI:
    http://ae.natinst.com/operations/ae/public.nsf/web/searchinternal/ad2d553f55a07bbf8625650d005f1f00?O...
    You are correct.  You can fetch data while an acquisition is in progress.  And you can fetch more data than will fit into memory provided you set the Enable Records > Memory property to true.  Take a look at the "niScope EX Fetch In Chunks.vi" and "niScope EX Multi Record Fetch More Than Available Memory.vi" shipping examples in:
    C:\Program Files\National Instruments\LabVIEW 8.2\examples\instr\niScope
    I hope this helps.
    Regards,
    Sean Close
    Product Support Engineer: High Speed Digitizers

  • How to Modify multiple users at the same time.

    Hi All,
    I oversee a lab with 8 24" imacs running 10.4. Each machine has the same set of guest user accounts. The machines are not connected by a actual server, although I can dump files to a common folder. My problem is every time I want to make system pref changes I have to go into each user account to apply them, (i.e.,adding a new monitor profile). Any ideas or work-arounds out there?
    Thanks
    Phil

    Hi Phil, and a warm welcome to the forums!
    It's not clear if these are connected in anyway, but if they are, something like Timbuktu® Pro for Mac OS X, or ARD...
    http://www.netopia.com/software/products/tb2/mac/
    http://www.apple.com/remotedesktop/

  • Updating a field in multiple tables at the same time

    Hi All,
    I have a table with right and wrong values of a field 'id'. I want to replace the wrong values in all the tables at all_tab_columns with the right values. I did the following and it did not work. Please help.
    CREATE OR REPLACE PROCEDURE Clean_ID_Proc(v_id number) IS
    right_id number;
    v_table_name varchar2(100);
    BEGIN  
        Select correct_id into right_id from tb_id
        where wrong_id = v_id;
        FOR table_cur IN (select * from all_tab_columns
                            where column_name = 'ID')
        LOOP
          EXECUTE IMMEDIATE 'update '||table_cur.table_name||'  set id = '||right_id||' where id ='|| v_id;
        END LOOP;     
    END;The error I have been getting is :
    [1]: ORA-00942: table or view does not exist
    [1]: ORA-06512: at "schema.CLEAN_ID_PROC", line 12
    [1]: ORA-06512: at line 1
    Thanks in advance

    user7415666 wrote:
    Hi All,
    I have a table with right and wrong values of a field 'id'. I want to replace the wrong values in all the tables at all_tab_columns with the right values. I did the following and it did not work. Please help.
    CREATE OR REPLACE PROCEDURE Clean_ID_Proc(v_id number) IS
    right_id number;
    v_table_name varchar2(100);
    BEGIN  
    Select correct_id into right_id from tb_id
    where wrong_id = v_id;
    FOR table_cur IN (select * from all_tab_columns
    where column_name = 'ID')
    LOOP
    EXECUTE IMMEDIATE 'update '||table_cur.table_name||'  set id = '||right_id||' where id ='|| v_id;
    END LOOP;     
    END;The error I have been getting is :
    [1]: ORA-00942: table or view does not exist
    [1]: ORA-06512: at "schema.CLEAN_ID_PROC", line 12
    [1]: ORA-06512: at line 1
    Thanks in advancewhat is the actual table_name of the table being updated?
    who owns this table?
    which USER owns & runs posted code?
    why did you bother populating TB_ID table instead of doing the UPDATE at that time?

  • There are multiple users with the same display name

    Hi,
    We have a user and when she get an item assigned to her she sees the following alert:
    "There are multiple users with the same display name USERNAME and at least one of them does not have read permissions to some of the files"
    Now I looked in the database and when I run the following query with the username:
     SELECT     
         [ProviderDisplayName]  
        ,[DisplayName]  
        ,[HasDisplayName]  
        ,[Domain]  
        ,[AccountName]  
        ,[UniqueUserId]  
        ,[LastSync]  
      FROM [Tfs_Configuration].[dbo].[tbl_Identity] where displayname like '%USERNAME%'  
    Then I get 2 same usernames back, How can I get rid of one of them ? When I access TFS trough the portal I only find 1 occurence of this user.
    We use VS2013 and TFS2013 update 4
    Best regards

    Hi DSW,  
    Thanks for your post.
    In your query result, please check if these two users have the same Account Name. if they are two different Account Name in result, it indicate there’s two users have the same display name in your AD, please check that two users’ information in
    your AD. We suggest change one user’s display name in AD.  
    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.

  • WebTools Creating multiple users for the same User

    I had to make a few changes to a BP in SAP which will synch back into WebTools but now I am getting multiple users for the same contact. For example my user is cspehar_1 now in Webtools there are cspehar_1, cspehar_2, cspehar_3 and so on up to _8.
    This is occuring for several users in webtools.
    What causes this and how do I fix it?
    Thanks,
    Craig Spehar

    Hi Craig,
    There are two ways to cause this that I am aware of:
    1.  Change the "Business Partner Synch Contacts Field" setting after the initial synch.
    2.  Change the Web UserID on the BP contact in B1 (OCPR.U_PRX_SID).
    After that, update the user in WT  and synch. (might also happen if  you update the BP in B1)
    Since the synch is using the OCPR.U_PRX_SID to identify the contact, it will not be able to find it in B1 if the U_PRX_SID has changed.  When it does not find it, it assumes it needs to be created.  This results in a duplicate.
    The solution is to reset the U_PRX_SID back to what it was or set the synch contact field back to what it was.
    Then delete the last created duplicate contact from B1.
    There may be further data corruption issues here.  If orders/quotes/opportunities or other dependant data has synchronized referencing the duplicate user, these data will need to be correct as well.
    FYI, whatever caused this was probably at the root of your order problem as well.

  • Find my Friends : Support for multiple users under the same Apple ID?

    Can multiple users under the same Apple ID use the app to find each other?  My daughter uses my Apple ID with her iPod touch which allows me to monitor her purchases but it seems that only one device under an ID can use the app at a time.  If that is the case then it is a major disadvantage and I will need to go back to using latitude (or Find My iPhone which also allows me to see where all of my devices are at the same time)

    http://isource.com/2011/10/16/how-do-you-set-up-icloud-for-a-family/
    This worked for me.

  • HT1660 how can I use one single library for all users on the same laptop?

    how can I use one single library for all users on the same laptop?

    You are most of the way there. Each user having access to hard drive is the key. If users are limited in file privileges this is harder.
    Any files you add to your library and any files she adds to her library are available to the other. Just not automatically. Each user must add the files to their own library using the add file or add folder option from menu bar.
    What I have done is set library location to a location outside of My Documents\My Music. On my network storage I have a folder names s:\itunes. Both accounts iTunes are set to use this location for the library.

  • Multiple users on the same ODI installation?

    Hi all
    is it possible to have multiple users working with the same odi installation? We have a virtualized IT infrastructure (citrix and wmware) where we can have multiple users on the same virtual instance. From our point of view, there is no licencing issue since we have a package covering literally everything.
    One of the issues are the config files stored in the installation directory of odi (../bin). Is there a way to tell odi to store them in a different location, eg. the user home?
    Thanks a lot
    Benno

    ODI looks in the current working directory for the configuration files, mostly you would have issues with the snps_login_work.xml and snps_login_security.xml files, but these may be common across all users. (just don't store the username/passwords for the ODI users in them).
    The way ODI works, most of what are creating is stored in the repository anyway, it is only local GUI config stuff that may be stored locally.
    Short answer, yes, you can, but might need to modify the config files a little to make it work.

  • What's the problem with having multiple users with the same UID?

    I've got three edit systems connected to the SAN using open directory off our server.
    I want all edit systems to have read/write access to everything created. I don't need to protect anything from any of the systems. With all three systems logged on using the same user, I never have to change permissions.
    The other cool thing about this is that Final Cut Pro will let me know if someone else is modifying a project that I have open with the warning:
    “The project "projectName" has been modified externally. If another user is working on it, saving will overwrite their changes. Do you still want to save?”
    This sounds great, right?
    RED FLAG!!!! Apple gives the warning in this article:
    http://docs.info.apple.com/article.html?artnum=302450
    "You should not allow two users with the same UID to access an Xsan volume at the same time."
    So why is it bad to have two (or more) users with the same UID?
    I can see that in some situations it means that you can't prevent people from read/write privileges. But I don't want to restrict privileges.
    What am I missing? With all of these warnings, it seems like if I do this my edit systems could all explode or something. Please help me understand the potential ramifications of having three users have the same UID.

    Hi Russell,
    1) If you have OD set up and "editor" has UID 1111, then when they log in to any machine that's bound to OD as editor, they will get UID 1111. Therefore, there won't be any of these permission errors. This is typically the recommended approach.
    2) I assume you mean "You'd prefer to not using open directory?" Whatever the case, OD isn't mandatory with Xsan -- it's just that with multiple user accounts, managing them centrally tends to be easier. For 3 or 4 accounts and 3 or 4 machines maybe it's no big deal. If you go larger, it could get a lot more complicated. That said, if you set it up such that each machine has the exact same set of users (as you said, Mary = UID 502, Fred = UID 503, William = UID 504), then you can do what you want. Mary can log in from multiple machines at the same time, and in general you won't have permissions problems. Of course, if you try and read and write the same file from multiple workstations at the same time, you will get file locking issues, which will prohibit somebody from successfully writing the file.
    File locking issues are different from general permissions errors. The former basically says "hey, someone else is editing this file. Therefore I won't let you edit it right now... you can read it if you want though." Permissions means somebody saves it, and Xsan thinks you saved it and own the file, when you really don't.
    Quad-Core PMG5, 4 GB RAM, 7800 GT, 1 TB disk.   Mac OS X (10.4.4)  

  • In Elements 7.0, how can I delete multiple photos at the same time?

    In Adobe Photoshop Elements 7.0, how can I delete multiple photos at the same time?   Please be a little specific so I can follow your instructions as I'm not real smart at computers; I'm an intermediate user.  Thank you.

    Shift-click the photos or Ctrl-click them to select them, then right-click one of them and choose Delete from Catalog. They will all go together.

  • Lightroom CC issues with multiple export at the same time

    Back before Lightroom updated to the CC version, I was able to use export presets to send 4 different versions of the photos I'm working on at the same time (A Full Size for client at certain size, full size for myself, web-sized with watermark and a thumbnail). Since updating to the CC version, I'm only able to start the export process on two of these versions before the system simply becomes crippled and I cannot even navigate through Lightroom without it chugging along.
    For reference, I'm running a 2014 rMBP with 16GB of RAM, LR is the only app open at the time and it's showing that I have roughly 6GB of RAM free when attempting this export.
    TL;DR: LR5 worked wiht multiple exports at the same time, but LRCC now chugs after 2 exports are started

    Re: "Selecting video in Messages, now starts Face time for video. Face time is one to one only."
    Apple "Messages" supports two different types of video conferencing. It's become more than a little confusing. If you (or the person on the other end) ONLY have accounts set up for Apple's "iMessage" service (associated with your Apple ID and "iCloud") you may see the video symbol, but when you click on it you will be connected via FaceTime which is limited a 1-to-1 video conference.
    However, if you have set up an AIM account in Messages (you may already have an AIM account ID if you once used iChat for video, audio and screensharing) and the person at the other end also has an AIM account you will be connected via AIM and will be able to do screen sharing and multi-person video conferences just like the old iChat, i.e. you'll have iChat Theater features, up to 4-way conferencing, etc.
    It can get very confusing if, for example, you've signed up for AIM using a .me or .cloud email address. But once you have it set up and learn to recognise the way Messages switches between AIM and iMessage all the old iChat features work just fine in Messages.

Maybe you are looking for

  • How do I install Flashplayer updates without McAfee

    I want to install Flashplay updates (for which I'm prompted) without installing McAfee virus checker. This very long dialogue thread http://forums.adobe.com/thread/1056732?start=0&tstart=0 claims (from staff) that you can uncheck a box so it is not i

  • Photoshop CS6 Upgrade Does Not Recognize CS3 Extended as Qualifying Product

    I am unable to install my Photoshop CS6 upgrade because the upgrade does not recognize a qualifying product on my system.  When asked, I enter my current Photoshop CS3 Extended serial number, but the upgrade does not recognize it as a valid serial nu

  • E7450 Latitude keys repeating / sticking / bouncing. OS Linux Mint KDE 17.1 64 bit

    Keys sticking and repeating.  Cannot be reproduced at will but will happen every few minutes or so while typing. I have not seen this when booting in to Windows 7. This problem makes this expensive computer frustrating to use.  There have been akin r

  • Error message when I try to upload site changes...

    I'm using iWeb '09 3.0.3 (9833). When I click "Publish site changes", I get an error message stating: "Couldn't reach the MobileMe configuration server. Try publishing your site again later." This is the first time I've ever gotten this message. I ch

  • Mac os x journaled partition problems

    I have a buffallo 500GB external drive that I have formated as mac os x journaled extended, which I am using to hold all my iTunes data, films, music, etc. However, the drive works ok for a couple of days and then stops working the drive indicator li