How to : only one user in a branch can do the batch process at a time ?

dear gurus,
In ADF web application, accessed by multiple branch (20), there is a
batch process to create invoices from orders. There are 3-5 users in a
branch. one user can process about 30 - 50 orders to become
invoices.
Business rule is : In one batch process, each users must produce
invoices with gapless invoice number. e.g : user_1 create 30 invoices
no.001 - 030, user_2 create 40 invoices no.031-070 ... and so on...
So we want to protect that at a time, in one branch, only one user can
do the batch process. User_2 must wait until user_1 is done to start
the process.
We use the table below to maintain the latest invoice number created :
CREATE TABLE doc_number
DOC_TYPE VARCHAR2(6 BYTE) NOT NULL,
BRANCH_CODE VARCHAR2(6 BYTE) NOT NULL,
DOC_NBR NUMBER(12) DEFAULT 0,
CONSTRAINT "DOC_NUMBER_PK" PRIMARY KEY (DOC_TYPE, BRANCH_CODE)
The question is :
I think of locking a spicific row of the doc_number table (select ...
for update wait 10) at the beginning of the batch process stored
procedure.
But what if the session/connection left orphan and the row is lockde
forever before the dba kill it ?
So is there a better approach to limit the user execution of the
process ?
Thank you very much for your help,
Krist

Forget it. See http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4343369880986.
However, if you are dead set on doing this old fashioned thing of trying to emulate paper invoices from a numbered tablet, you could always just let everyone generate all of their invoices with no invoice number whenever they want, then at some time ( say 21:00 every day), take a lock on the table and apply invoice numbers to all of the records with a null invoice number -- which will take only a few centiseconds at most. And let the users/system print only invoices that have numbers assigned. This way, you pretty much eliminate the concurrency issue of various branches generating invoices only in their time window -- yuk, what an awful way to have to do business.
And completely forget about users or branches having their own range of numbers. That is completely nuts. Your database already knows which branch owns which invoice, right??

Similar Messages

  • Locking a JSP Page i.e allowing only one user to access it at a time

    Hi,
    I have web application where multiple users can log in at the same time.
    I have a JSP where a user is presented with a list of executable items.It is quite possible that at the same time more that one user tries to execute the same item.I want to disable this. i.e at a time only one user should be able to execute the item.
    Currently what i can think of is putting an extra column in the database...saying that this item is locked and you cannot access it until unlocked.But then this would involve a round trip to database.I want to avoid it, and do some coding in java code itself.
    But i dont know how to proceed.
    Any Help......

    sorry for the misdirection :(
    yes..try using the synchronizing for the run process for of the item in the action class.
    I shall try to provide you with the code changes, if can you please provide the back end code doing the job u said

  • How can I make only one user to be able to change a field

    I want only one user to be able to change material group for example.
    I want all other users when trying to change material, to see thie field - material group - display only.
    How can I do this?? What are the steps??
    Thank you

    Dear Theodoros,
    For the user to create/change material group:
    Go to transaction PFCG -> enter the role that you are using -> Select "authorizations" tab -> Edit Profile -> Here you will maintain activities for different authorization objects. Maintain Acticity "01" for material group authorization object.
    For the users to display material group:
    Go to transaction PFCG -> enter the role that you are using -> Select "authorizations" tab -> Edit Profile -> Here you will maintain activities for different authorization objects. Maintain Acticity "03" for material group authorization object.
    Authorization Object for Material Group: M_MATE_WGR
    Regards,
    Naveen

  • How many installs? I have an old pc that is 7 years old, 2 recent laptops. only one user, me.

    How many license installs? I have an old pc w 1 TB that is 7 years old, 2 recent used (HP and Dell) laptops. only one user, me. I have an external 4 TB drive that I want to bring in pictures from and edit. I want to find out which is better. Am I allowed to install 2 at a time, deactivate one and add another, and then finally removing all but one license.

    Yes, you are allowed two activations at any one time. Once you have deactivated one, it is free for use on another.
    Benjamin

  • Multiple users shuts down to only one user

    I have multiple users on my IMac.
    Recently when I go to log on the computer instead of show all users, it shows only one user (not me) and I have to log on to that user and log off to see all users again.
    Any ideas how to fix this?

    After migrating your whole user account from another computer you will be left with 2 user acounts on the target computer.
    The best way to keep just the new user account is to log into the account you want to keep, then go into system preferences > users&groups (Accounts if using snow leopard) then delete the other account.
    (Make sure you have a backup of any files you wish to keep on that user account if any)
    If you wanted to just merge particular files from one computer to another instead of creating two user accounts you would be better off using the good old drag and drop method instead of migration assistant.

  • Only one user at a time can log in per client

    Server: 10.6.2
    Client: 10.5.8
    The share point on the server is the default of /Users. Home directories are configured as /Network/Severs/hostname/Users/username. In the "Home" tab of each user, the home directory shows up as "afp://hostname/Users", which is the default when creating a user.
    On a given client, only one user can log in at a time. If the first user switches to the login screen without logging out (fast user switching), when the second user attempts to log in, they get an error "You are unable to log in to account "xxxx" at this time."
    Looking in the secure.log, the error appears to be "file busy":
    Mar 7 12:13:39 G4-MDD authorizationhost[677]: ERROR | -[HomeDirMounter mountNetworkHomeWithURL:attributes:dirPath:username:] | PremountHomeDirectoryWithAuthentication( url=afp://Mini.local/Users, homedir=/Network/Servers/Mini.local/Users/xxxxxx, name=xxxxxx ) returned 16
    The server's /Users directory is mounted. It appears to be trying to automount another copy, rather than use the existing mount.
    How do I resolve this so multiple users can be logged in at one time? Surely I don't have to create a share point for each user?

    I'm glad to hear I'm not the only one encountering this problem, although the fact that this problem has apparently existed for some time is mind boggling to me. The idea that there is some data corruption issue here is not a valid concern. We did this all the time on Linux in my previous life. There is no need to unmount the mounted directory, at least in the default case. The mount point is /Users. Home directories on the server are /Users/fred and /Users/sally. Automounter mounts /Users at the mount point /Network/Servers/serverhostname/Users. Fred is logged in and can access /Users/fred. Now Sally wants to log in. /Users is already mounted. There is no reason to unmount/remount /Users. OS X can see it is already mounted. Just log Sally in - she already has full access to her files.
    If Fred and Sally reside on different servers, then there would be different mount points /Network/Servers/hostname/Users - again no conflict in the mount points.
    The only solution I can see right now is a separate share point for each user, which is unacceptable. That might work for my two users. It's hardly scalable from a maintenance standpoint.
    I do have the problem of fred logging out and sally not being able to get in right away, but that period is probably less than a minute. Wait a minute, then sally can log in.

  • Concurrent program to be submitted y only one user at a time

    Hi
    I have an issue with one of my reports. The report is using temporary tables, those will under go insertion and deletion while the report is running. So, to make sure that two or more concurrent requests submitted for same report, will not conflict, I want to make my concurrent request to be submitted by only one user at a time.
    How can I do that?
    Any help is appreciated.
    Thanks
    BalaKrishna

    The "run alone" box should not be checked. This indicates that this program can only run when no others are running. Pl see MOS Doc 1078462.6 (Custom SQL Concurrent Program Returns NO MANAGER Error). This option should typically not be used.
    To be able to achieve what you need, set the incompatibility (as you have done) and then bounce the concurrent managers for the setting to take effect. Pl see these MOS Docs
    436186.1 - Cannot Make Concurrent Programs Incompatible With Itself
    142944.1 - How to Make a Concurrent Program Incompatible with Itself
    HTH
    Srini

  • Program installed for only one user

    Have a program that is installed for only one user, how can I get another user access to the software? don't have install disk.
    Thanks

    Select the application's icon then Press COMMAND-I to open the Get Info window. In the Ownership and Sharing section check the owner and group assignments. If they have owner=you and group=you or staff, then you must change those. Open the Terminal application in the Utilities folder and enter the following command line at the prompt:
    sudo chown -R root:admin
    Put a space after "admin' then drag the application's icon into the Terminal window and press RETURN. You will be prompted for your admin password which will not be echoed.
    This should enable other users to access the application provided you have given the user access via their managed account preferences in Accounts preferences.

  • Mail delivery failed: returning message to sender (Only One User)

    Hi,
    I am facing really strange issue from last two days but fail to resolve the issue.
    My hosted exchange 2010 is working absolute fine. I configured new domain (previously using SBS2003 with Postini service), all users are working fine no spam emails, NDR etc (We are using Forefornt Protection 2010 for Exchange Server, All engines are updated)
    but only one user/email address continuously receiving spam emails. Please review the attach pictures of Message Tracking, Email and Header.
    I really don't know what is the issue, users continuously receiving below emails after 2 or 3 minutes, i am just wondering why my exchange server allow those email address. How i can stop these emails. 
    Note: Old SBS server is shutdown. Postini service is already disabled.
    Please help me.
    Mail:
    Header & Tracker:

    Hi,
    According to your description, it seems that the user's computer has virus. 
    I recommend you scan the user's computer and check if any virus caused the issue.
    Thanks.
    Niko Cheng
    TechNet Community Support

  • 1. Does not start automatically  2. Only ONE user at a time

    When I plug the IPOD it should start iTunes automatically (I have the box checked) but it does not. Never has done that. I have the latest 7.1 version.
    Another pain in the rear is that only one user at a time can run iTunes. That stinks. If another user has it open you MUST log off, stop them, log on. They ought to make this work for all users as other windows pro rams do. If it is doing NOTHING with the library then I ought to be able to use it.

    That may be true but it is a real pain since when it happens the only way to recover is to terminate all of the iTunes modules with task manager and start it manually. It also leaves the IPOD in a state that says do not disconnect. You can disconnect since nothing is really happening but there is no excuse for this not to start much faster. When you have multiple users it is a real pain. It ought to be able to either end when finished or better yet allow multiple users simultaneously updating from different libraries.
    I guess i will just have to get in the habit of treating it as a single user and start and stop it every time I need it and be suer not to let it run. Not nice because that means waiting for larger Podcast downloads instead of having there ready for me when I sign on my computer.

  • Only one user at a time

    I'm looking for help.
    I have two user accounts on my iMac. Both have their own iTunes library file but these both reference to a shared store of music files (to avoid duplicates). I would now like to move this shared music to an external HDD attached to my TC.
    My problem is this. If user 1 first accesses the external HDD then when user 2 tries to do so there is a little red icon on the folder and permission is denied. If I disconnect all users from the TC and then retry with user 2 the problem is reversed. It seems to me that only one user account is allowed to access a TC external HDD at a time. Is there any way around this?
    In case anybody asks, my reason for moving the files is that I am hoping to buy a Sonos music system, which can read iTunes music from the TC as though it were an NAS, even if the computer is off.

    I think you're being misled a bit by the interface: the checkbox labelled "Strict locking" doesn't just allow strict locking, it requires it (and thus disallows byte-range locking). That is, with strict locking enabled, any client that tries to lock any part of the file actually locks the entire file. Access normally depends on byte-range locking to allow different clients to share the database (as long as they aren't trying to modify the same part of it at the same time), but with strict locking the first client locks all others out.

  • Only one user at the time can execute VE01 (due to blockage of VEIAV)

    Hi,
    As I understand it only one user at the time can execute VE01 (or MEIS for arrivals). If someone is already executing the VE01 transaction the error-message "Table VEIAV is blocked by user XX" appears. It does not matter if one tries to execute it for different legal entities - no parallel processing seems to be possible.
    This is a huge limitation for a global concern with many entities operating in the same SAP instance. Does anyone recognize this problem and are there any ways to get around it? It does not make sense that dispatches (VE01) and arrivals (MEIS) cannot be executed for several organizational units at the same time in parallel?
    Thanks in advance,
    Mats Hansson

    yes I know this problem.
    One should not maintain much thru this transaction.
    for me it is not more than an emergency transaction, as it is not really more than table maintenance thru SM30
    You should investigate what entries/changes the users have to make.
    Limit these manual entries by having better data in the system, so that SAP can itself create the entries for this table.
    Organize more, less users , maybe just one per company who shall maintain VEFU manually.
    Train them to prepare their entries before they start using VEFU.
    Explain that they should leave VEFU as soon as possible as the block other users.
    assign maintenance windows to the users.

  • Download application to only one user

    Is it possible to download applications that are specific to each user on the computer - i.e. they only appear in the application folder of the user that downloaded them.

    The folder Applications is a directory shared by all users not just you. The specific use of any one application is customised per user, and this information is contained in the User's Preferences files within their home folder. So for example with one Safari, different users can have their own homepage, particular websites, passwords etc. but it is still all from just one copy of Safari.
    If you wanted to limit the use of an application to only one user, you could change the user permissions for that application to be limited to one selected user only. This can be done in the Get Info dialogue box pertinent to the application. But this would be an unusual practice and I question why you would want to do this.

  • Why does the Error: 500 SC_INTERNAL_SERVER_ERROR appear when multiple users access my JSPs but does not occur when only one user accesses my JSPs?

    When multiple users run my JSP application, why do some users get an Error: 500 SC_INTERNAL_SERVER_ERROR for certain JSP pages with the error message No such file or directory. The JSP listed on the Error 500 page varies and is not always the same. When only one user runs my JSP application, the problem does not occur?
    The database connection is held when the user logs in or accesses certain parts of the JSP and then is immediately released. No connections to the database are held.
    We are using Solaris 8 with MU_6 plus recommended patches.
    Enterprise Ultra 250
    iAS 6 SP 3

    Is anything showing up in the KXS or KJS logs?
    It sounds like you might having some kind of thread safety issue with your code. Either that or your guess about running out of database connections.

  • FRM-40501 - Even if there is only one user

    Hi experts!
    When we try to updated a value of a database item in Forms 10g runtime, it throws FRM-40501 error and the values are not getting commited. Only one user is accessing the database. Query Allowed, Insert allowed and update allowed are set to yes in the block. Is there any property to be set to make it work?
    The same code works well in Forms 6i but not in 10g Forms. Plz help me out..
    Thanks in Advance,
    Natz...

    FRM-40501: ORACLE error: unable to reserve record for update or delete.
    Cause:  A fatal error occurred while trying to select the record for update.
    Action:  Pressing [Display Error] provides more information, if it is available. You can also try to update or delete this record later. If necessary, contact your DBA.
    Hard to say why this is happening because you haven't provided much information.
    * Have you tried pressing the Display Error?
    * What is your form doing when the error occurs?
    * Does this only happen to certain records? If so, your DBA will may need to unlock them.
    * Are you using lock_record built-in?
    * Have you tried creating a simple form and seeing if the problem still occurs?

Maybe you are looking for

  • Adobe Premiere Elements 11 Application Crash

    Operating System: Windows 8 Pro 64-bit System Model: HP Pavilion dv7 Notebook PC BIOS: InsydeH2O Version 03.60.48F.1B Processor: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz (8 CPUs), ~2.2GHz Memory: 16384MB RAM Available OS Memory: 16332MB RAM Page Fil

  • Vertical lines in table untill end of the window

    Hi All,        I have created a table with 5 cloumn for item details  in main window, but the lines are not running untill to the end of window size which i given .if i have 2 line items then the vertical lines stops at 2nd lines itself ,but i want i

  • Email submit not workign in Quiz?

    I have created a simple quiz in Captivate 3. When I preview the project in Captivate, it works correctly and the submit results button launches my mail and dumps in the quiz results like it is suppose to. BUT... When I publish the quiz, save as a .sw

  • Qosmio f60 14q, slow boot

    my laptop has an extremly slow boot time so i downloaded soluto to check if a program is causing it and after multiple tests it takes 4-5 mins till i can use it. so i used the hdd recovery and reinstalled windows 7. and now it takes ~3 mins to boot.

  • Can't connect to my wi-fi network

    I cannot connect to my wi-fi network. The phone finds it but when I choose it, it simply tells me that it is unable to join the network. I am thinking it is a password issue but the phone never asks me for my password. The wi-fi is locked so it needs