Using sequence in a multiuser environment

We plan to use table wise sequences to generate incremental ID's for each Oracle table. Is this an issue in a multi user environment ? SOmebody said this could have contention issues and slow down performance. We expect this application to have in excess of 300 users on the LAN .
ANy inputs appreciated.

Hi!
This should not pose a big issue, if you have 300 users. Even if they modify a lot of tables - each table having their own sequence - the cache of the sequence will be refreshed when the last number is used. Choose a cache size for each sequence that will be refreshed for example once a day, and there shold not be a big performance problem.
cu
Andreas

Similar Messages

  • JDeveloper installation on WindowsXP Multiuser environment

    Hello,
    I've got a problem installing JDEveloper 10.1.3.3.0 on a WindowsXP multiuser environment.
    I downloaded and extracted the archive into the C:\Programme directory (where it belongs) as admin user and I can start it without problems as long as I'm logged in as admin (despite the fact that a JDK 1.5 is already installed).
    But when I try to start JDeveloper with a normal user account (without admin rights) from there I only get the splash screen progressing a little bit and nothing else happening afterwards.
    So JDeveloper does not start for me within the account I want to use it with!
    How can I manage to start JDeveloper for normal users on that WindowsXP system?
    Does anybody have any hints on this?
    Many thanks in advance!
    Best Regards

    It is recommended to unzip JDeveloper in a directory
    without spaces. Windows installs all programs into
    C:\Program Files, this one has a space in between. So
    make sure you unzip into C:\oracle\jdeveloper or
    something like that. Also make sure as admin grant
    full permits to windows users, read, write and
    execute.It is, I installed it into C:\Programme\JDeveloper.
    Do you mean I'll have to give these rights for normal users to the JDeveloper directory!?
    This is completely contradictory to the idea behind the restricted accounts in Windows!
    Best Regards

  • Disadvantages of using sequence

    Hi
    Please let me know the disadvantages of using sequences.
    Thank you

    Massimo Ruocchio wrote:
    I dislike that a sequence is called even if it doesn't need to be called:Why?
    Because you lost numers?
    There are many other scenarios in which you loose sequence's values, as I've already wrote, so if per your requirements you have not to loose values you simply cannot use a sequence, otherwise you can use it and there are no disadvantages...
    Generally speaking I like or dislike many things: food, people, football (soccer) players, etc. But I cannot like or dislike a tool. I use it if it fits my needs otherwise I don't use it ;)
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/31/le-direttive-di-compilazione-pragma/]
    I agree with michaels. It is a waste to generate sequence numbers when there is no need to generate them.
    It's not because there are gaps, but because those gaps could be avoided.
    Furthermore it could cause a performance problem, especially if the sequence is not cached or the cache is small and if you are in a RAC environment.
    Of cause this issue can be circumvented with a different application logic. I myself use sequences mainly in triggers and avoid calling them directly.
    However it would be nice if some smarter optimizer logic, would avoid fetching new sequence values, putting them in the buffer chache...ageing out other sequences because of that, etc.
    "Dislike" is a good word for it. it's not a real problem/issue, but something that could have been implemented smarter, but wasn't.

  • MAX(SummaryNum) +1 bad idea, but how to use sequence part composite column

    Hi,
    My relational mode is as follows
    Policy (policynum PK) has 1:M with Summary (policynum FK, SummaryNum part of PK, other columns part of PK)
    Basically for each policy users can enter notes with SummaryNum 1, 2, 3, 4.... These numbers are shown to the user for tracking purpose. I need to make sure summary notes for EACH policy start with 1 (cannot really use sequence in the table in the strictest sense) and are incremented by 1. The current Oracle form basically creates the next highest possible value of SummaryNum by adding one to the currently available highest value. In brief, it is like a sequence number for summaries of a particular policy in the summary table.
    PRE-INSERT
    SELECT MAX(SummaryNum ) + 1
    FROM Summary
    I am trying to replicate this in ADF BC (using 11g) and know that not using sequencing and adding one to get the next number is a very bad idea due to concurrency challenges (transactional ACID properties). The reasons are as follows.
    •     Using MAX(policy_memo_seq_num) + 1 is not scalable,
    •     It will lead to duplicates in a multi-user environment, whether ADF BC, Oracle Forms, or any other technology
    I also know how to use create a sequence in db, a related trigger, and then set the attribute in EO properties as DBSequence. My challenge is that since SummaryNum is not a primary key, and instead is part of a composite key in my case, how do I make sure that summary notes for EACH policy start with 1 in the Summary Table.
    I appears that i cannot really use sequence in the table in the strictest sense as this will mean that for policies the summaryNum will start from the next available sequence number, but what i really want is to have it start by one for all policies.*
    I would appreciate any help.
    Thanks,

    Not sure if there is a better way, but here is one way. Let's say your table was like this:
        SQL> desc versioned_item
         Name         Null?    Type
         ID           NOT NULL NUMBER
         VERSION      NOT NULL NUMBER
         DESCRIPTION           VARCHAR2(20)and lets say your data looked like this:
        SQL> select * from versioned_item order by id, version
                ID    VERSION DESCRIPTION
              1001          1 Item 1001
              1001          2 Item 1001
              1001          3 Item 1001
              1002          1 Item 1002
              1002          2 Item 1002
              1003          1 Item 1003To select only the rows for the max-version-id, you could do this:
        select id, version,description
        from versioned_item
        where (id,version) in (select id,max(version) from versioned_item group by id)
        order by id
                ID    VERSION DESCRIPTION
              1001          3 Item 1001
              1002          2 Item 1002
              1003          1 Item 1003To capture this as a view object, you'd only just need to paste in the WHERE clause above into the Where clause box of the view object. No need to use expert-mode since you're not changing the select list or from clause.

  • About Document IDS in multiuser environment

    I am developing an online application using oracle 8.0.5 , it is a multiuser environment , what is the best method to code about generating the number of documents from multiple places , how we can lock the number (document number e.g. Purchase Order) generated for one to another , please tell advice me the best & feasible approach to handle the tie of a mnumber from different sites and handeling of cancelation of any generated number from one person and alloting it to other users
    thanks

    Its bad because global variabels will be used and changed by different users at same time.
    This will lead to variuos problem like user1 setting the variabel, user2 seting it , user1 using it with the value user2 set.

  • Using Berkeley With Two Different Environment Simultaneously

    I am trying to use Berkeley with two different environment simultaneously in one program. But I am getting an error message of Databases left open. The first environment close with no error but the 2nd environment, having an error like this,
    Exception in thread "main" java.lang.IllegalStateException: Unclosed Database: element_primary_key_index\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Unclosed Database: class_catalog\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Unclosed Database: element_database\\192.168.150.211\glassfish3\Berkeley\environment\Testing11
    Databases left open: 3
         at com.sleepycat.je.Environment.close(Environment.java:383)
         at com.svi.tools.gfs3v10domain.database.GFS3v10ReadWriteDatabase.closeUpload(GFS3v10ReadWriteDatabase.java:155)
         at com.svi.tools.gfs3v10domain.GFS3v10Domain.closeReadWrite(GFS3v10Domain.java:160)
         at com.svi.tools.gfs3v10.util.GFS3v10UploadUtil.closeUpload(GFS3v10UploadUtil.java:97)
         at com.svi.tools.gfs3v10.GFS3v10.closeUpload(GFS3v10.java:115)
         at com.svi.tools.gfs3v10uploader.util.Uploader.uploadFiles(Uploader.java:89)
         at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.mainMethod(GFS3v10Uploader.java:109)
         at com.svi.tools.gfs3v10uploader.GFS3v10Uploader.main(GFS3v10Uploader.java:52)
    Please someone help me with my problem. Thanks in advance.

    Hi Mark,
    Here is my sample program for the problem:
    import java.io.File;
    import com.sleepycat.bind.serial.StoredClassCatalog;
    import com.sleepycat.je.Database;
    import com.sleepycat.je.DatabaseConfig;
    import com.sleepycat.je.Environment;
    import com.sleepycat.je.EnvironmentConfig;
    import com.sleepycat.je.EnvironmentLockedException;
    import com.sleepycat.je.SecondaryConfig;
    import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementData;
    import com.svi.tools.gfs3v10domain.objects.GFS3v10DomainElementKey;
    import com.svi.tools.gfs3v10domain.views.utils.ElementByPrimaryKeyCreator;
    * Read Write Database used for every thing else.
    public class MethodsSample implements GFS3v10Database {
         * Environment where the Database resides.
         private Environment environment = null;
         private boolean isClose = false;
         String environmentString;
         * Class Catalog for Stored Classes.
         private static StoredClassCatalog classCatalog;
         * Element Database.
         private static Database elementDatabase;
         * Element Database by Primary Key.
         private static Database elementByPrimaryKeyDatabase;
         private static Database catalogDatabase;
         * Default Constructor.
         public MethodsSample() {
    * Alternate Constructor.
    * @param homeDirectory Location where the Database is Located.
    public MethodsSample(String homeDirectory) {
         environmentString = homeDirectory;
         openEnvironment(homeDirectory);
         openDatabase();
    @Override
         * Opens the Read Write Database.
         * @param homeDirectory Location where the Database is Located.
    public void openEnvironment(String homeDirectory) {
         EnvironmentConfig environmentConfig = new EnvironmentConfig();
    environmentConfig.setTransactional(true);
    environmentConfig.setAllowCreate(true);
    environmentConfig.setDurability(DURABILITY);
    while (environment == null) {
         try {
              environment = new Environment(new File(homeDirectory), environmentConfig);
         } catch(EnvironmentLockedException ele) {
              try {
                             Thread.sleep(500);
                        } catch (InterruptedException e) {
    @Override
         * Opens the Database.
    public void openDatabase() {
         DatabaseConfig databaseConfig = new DatabaseConfig();
         databaseConfig.setDeferredWrite(true);
    databaseConfig.setAllowCreate(true);
    catalogDatabase = environment.openDatabase(null, CLASS_CATALOG + environmentString, databaseConfig);
    classCatalog = new StoredClassCatalog(catalogDatabase);
    elementDatabase = environment.openDatabase(null, ELEMENT_DATABASE + environmentString, databaseConfig);
    SecondaryConfig secondaryConfig = new SecondaryConfig();
    secondaryConfig.setDeferredWrite(true);
    secondaryConfig.setAllowCreate(true);
    secondaryConfig.setSortedDuplicates(true);
    secondaryConfig.setKeyCreator(new ElementByPrimaryKeyCreator(classCatalog, GFS3v10DomainElementKey.class, GFS3v10DomainElementData.class, String.class));
    elementByPrimaryKeyDatabase = environment.openSecondaryDatabase(null, ELEMENT_PRIMARY_KEY_INDEX + environmentString, elementDatabase, secondaryConfig);
    @Override
         * Gets the Environment.
         * @return Environment.
    public Environment getEnvironment() {
         return environment;
    @Override
         * Gets the Class Catalog.
         * @return Class Catalog.
    public StoredClassCatalog getClassCatalog() {
         return classCatalog;
    @Override
         * Gets Element Database.
         * @return Element Database.
    public Database getElementDatabase() {
         return elementDatabase;
    @Override
         * Gets Element By Primary Key Database.
         * @return Element By Primary Key Database.
    public Database getElementByPrimaryKeyDatabase() {
         return elementByPrimaryKeyDatabase;
    @Override
         * Closes Database and then Environment.
    public void closeUpload() {
         System.out.println("1st Jar environment closing = " + environmentString);
         elementByPrimaryKeyDatabase.close();
         elementDatabase.close();
         classCatalog.close();
         catalogDatabase.close();
         environment.close();
         isClose = true;
    public Boolean isClose() {
         return isClose;
         @Override
         public void closeOthers() {
    for the Main:
    public class sample {
         public static void main(String[] args) {
              String environment1 = "\\\\192.168.160.184\\glassfish\\berkeley\\environment\\home\\Multiple\\Testing11";
              String environment2 = "\\\\192.168.150.211\\glassfish3\\Berkeley\\environment\\Testing11";
              openCloseEnvironment(environment1, environment2);
         public static void openCloseEnvironment(String environment1, String environment2) {
              MethodsSample forEnvironment1 = new MethodsSample(environment1); //Opens the Databases
              MethodsSample forEnvironment2 = new MethodsSample(environment2); //Opens the Databases
              forEnvironment1.closeUpload();
              forEnvironment2.closeUpload();
    // same error happens no matter what sequence for closing
    Thank you.

  • How to use Sequence in Forms

    Hi,
    I have an Empno Column, At the time of Opening a Form The Empno Will be displayed by using Sequence.
    If the User doesn't save the Form Then the Empno Generated number will be changed.
    How to write the code to get sequence numbers at Empno columns by using Sequence?
    Thanks & Regards,
    Hari Babu

    Ok, I understand now your question. Since the oracle sequence is commited in a separate transaction, it is not possible to get the no-gap sequence, considering your example. In the other hand, if you don't commit immediately, than two concurrently opened forms could use the same sequence number, so you'll get the duplicate key!
    If you're sure that this couldn't happen, you can manage your own sequencing, storing them in another table. Let's say you reached seq 999: entering the form, you'll read from your sequence table 1000, increment to 1001, and assign it to empno, but without commiting. Next time, you'll get the same number, until you commit form, and at the same time, change in seq table. So another will get 1001.
    Downside of this approach are, as mentioned before, concurrent sessions, which will get the same sequence.

  • Comenting code - style - how to keep coments where you want them - without using sequences

    Silly question maybe about style of commenting.
    Basically i like to use sequence boxes to keep comments on my diagram beside the bits of code that they refere to - otherwise when you use diagram cleanup (which i'm afraid i use all the time) they go anywhere.  This is good - except that i found especially when doing FPGA programming the sequence boxes reduce the amount of parralelism that can go on - since the 'box' needs to finish before any of the outputs can be used.  Is there some other method i should be using instead of sequence boxes to keep text beside elements - without enforcing that a set of elements are fixed in one place?
    Solved!
    Go to Solution.

    I usually use labels of structures (loops, cases, etc) and labels of diagram constants, etc. for comments. In newer versions, we also have wire labels.
    (see also)
    What is your LabVIEW version? Also the LabVIEW 2011 cleanup does a better job keeping diagram comments together with the related code compared to earlier version.
    LabVIEW Champion . Do more with less code and in less time .

  • Need a good charting library (for use in a servlet/jsp environment)

    Anyone know of a good charting library for use in a servlet/jsp environment.

    Use JFreechart combined with cewolf.
    www.object-refinery.com/jfreechart/
    To use charts in a jsp page you can use cewolf ( a taglib) based on jfreechart.
    http://cewolf.sourceforge.net/
    Both are free.

  • How to retrieve the Id I used to create the Icloud environment. Each time I use an Apple identifier, I receive a message like it not the one you used at Icloud creation time

    Hi,
    I defined my Icloud environment some time ago. Unfortunatly, I forgot wich Id I used for it. Now I receive a message like "This is a valid Apple Id, but it is not the Id you used to create your Icloud environment.
    So, my question is: where and how can I either replace my Icloud Id or retrieve it ?
    Thank you for your help ...
    Regards
    By the way, you will probably consider that my English is as bad as a computer translation from French. I would thank you for this evaluation !

    Hi Michael,
    Follow the instructions on this link. Be sure to sign out of your old iCloud account on your computer and your devices before setting up you new one. Then sign on the new iCloud account on your PC and your devices once you have set it up using your new AppleID as the iCloud account:
    http://www.apple.com/icloud/setup/pc.html
    Cheers,
    GB

  • Flex Dashboard and Using Flex in a Portal Environment

    Hello
    I am looking to develop Flex dashboard and use Flex in a Portal environment.
    If you any thoughts or information, kindly let me know or some insight.
    Thanks and regards

    fac586 wrote:
    #WORKSPACE_IMAGES# isn't substituted in CSS files stored in the repository. See this [previous discussion|http://forums.oracle.com/forums/thread.jspa?forumID=137&threadID=221653] (and others if you search for them).
    Thanks for the link, I did search a little while before making the original post. I guess I wasn't searching for the right thing though.
    The method I found listed in here seems to work in IE but not Firefox. It could just be a caching issue though I'm not real familiar with firefox and don't really know how to get it to forget that it's been to a page already.
    I also updated the link listed above to ask about any changes in the last upgrade related to this.
    This was related to caching in firefox and it worked fine after I logged out of my apex.oracle.com account and cleared the personal cache in firefox and then started over.
    Edited by: PktAces on Sep 9, 2008 3:06 PM

  • Error Using Sequence in Weblogic

    I tried to use Sequence object in weblogic to generate auto-imcremental integers
    for my db insert keys. I first create a mydbsequece in oracle database. Then,
    I built a class in which I obtain a dataSource using jndi to look for my dataSource.
    And then use the ds to getConnection. After I had the connection, I do the following:
    Sequence sequence = new Sequence(con, "mydbsequence");
    int i = sequence.nextValue();
    When I call sequence.nextValue() method, I got the following error message: NullPointerException
    at Weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:65).
    Does anyone know what causes this error? and How do I fix it? Please advise me
    on this. Thank you very much.
    Qin

    Qin Ding wrote:
    >
    I tried to use Sequence object in weblogic to generate auto-imcremental integers
    for my db insert keys. I first create a mydbsequece in oracle database. Then,
    I built a class in which I obtain a dataSource using jndi to look for my dataSource.
    And then use the ds to getConnection. After I had the connection, I do the following:
    Sequence sequence = new Sequence(con, "mydbsequence");
    int i = sequence.nextValue();
    When I call sequence.nextValue() method, I got the following error message: NullPointerException
    at Weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:65).
    Does anyone know what causes this error? and How do I fix it? Please advise me
    on this. Thank you very much.
    QinSequence is a non-standard JDBC object. It is an Oracle-specific class, which presumably
    takes a standard java.sql.Connection in it's constructor. Oracle has repeatedly created
    such new classes with methods claiming to take java.sql.* arguments, but in fact they
    require an Oracle-specific class. In this case, however, we might succeed anyway if
    we dig some. Can you show me the entire stacktrace of the exception?
    Please take the attached jar file, and put it in front of all the weblogic stuff
    in the server's classpath, and repeat the problem and show me the new exception.
    From the line, I am assuming you're on the 6.1 version of WebLogic. If not, forget the
    jar, and let me know.
    Joe
    [61rmicon.jar]

  • Using sequence  in view

    hi gurus
    SQL> create view v1 as select s1.nextval from dual;
    create view v1 as select s1.nextval from dual
    *+
    ERROR at line 1:
    ORA-02287: sequence number not allowed here
    Are there only workaround?
    Thank you!

    There are some restrictions on using sequences you will want to know about
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/views.htm#sthref3092

  • USING SEQUENCE IN PACKAGE SPEC

    I Want to Use Sequence.NEXTVAL & Sequence.CURRVAL throughout the package. How can i declare the global sequence variable and make them available for all the stored procedures inside the package ?
    Any help highly appreciated..
    Thank you all in advance

    Data Boy wrote:
    No i know that but using directly SEQUENCE.CURRVAL inside the Insert statement is not a good practice.
    We need to declare inside the procedure a variable and then fetch the SEQUENCE.CURRVAL into that variable
    and use that variable inside the insert statement. But we that variable scope will be available only inside that procedure.
    if i want the same CURRVAL in another stored procedure. How can i get it ..that is my Question.What exactly are you trying to achieve?
    If it's a case of needing to know the value of the sequence number assigned to an inserted record you would typically use the RETURNING clause on the insert statement...
    SQL> create table temp (id number, val varchar2(20));
    Table created.
    SQL> create sequence temp_seq;
    Sequence created.
    SQL> ed
    Wrote file afiedt.buf
      1  create trigger trg_temp before insert on temp
      2  for each row
      3  begin
      4    select temp_seq.nextval into :new.id from dual;
      5* end;
    SQL> /
    Trigger created.
    SQL> set serverout on
    SQL> declare
      2    v_num number;
      3  begin
      4    insert into temp (val) values ('Fred') returning id into v_num;
      5    dbms_output.put_line('ID inserted was: '||to_char(v_num));
      6  end;
      7  /
    ID inserted was: 1
    PL/SQL procedure successfully completed.
    SQL> select * from temp;
            ID VAL
             1 Fred
    SQL>

  • Using Sequence in ODI

    Hi I am very new to this tool can anyone tell me how to use sequence and populate Primary key in my Oracle target table. I am doing File to Oracle Mapping.
    I am using ODI sequence but i am getting errors like:
    933 : 42000 : java.sql.SQLException: ORA-00933: SQL command not properly ended
    and also delete previous check sum in Session Control
    Need ur reply asap

    Thnx Madha!
    I have change my KM to IKM SQL Control Append but the problem still persists.
    I am getting the same error message in the control workflow (~Operator Window).
    1] Control-<TGT_SECURITYSEGMENT_DIMENSION>-Create Check Table and also
    2] Control-< TGT_SECURITYSEGMENT_DIMENSION>-delete previous check sum
    The Description of the same is:
    create table Exception getObjectNameDefaultPSchema("L", "SNP_CHECK_TAB", "W") :
    CATALOG_NAME VARCHAR2(100 CHAR) NULL ,
    SCHEMA_NAME VARCHAR2(100 CHAR) NULL ,
    RESOURCE_NAME VARCHAR2(100 CHAR) NULL,
    FULL_RES_NAME VARCHAR2(100 CHAR) NULL,
    ERR_TYPE VARCHAR2(1 CHAR) NULL,
    ERR_MESS VARCHAR2(250 CHAR) NULL ,
    CHECK_DATE DATE NULL,
    ORIGIN VARCHAR2(100 CHAR) NULL,
    CONS_NAME VARCHAR2(35 CHAR) NULL,
    CONS_TYPE VARCHAR2(2 CHAR) NULL,
    ERR_COUNT NUMBER(10) NULL
    and error is :
    922 : 42000 : java.sql.SQLException: ORA-00922: missing or invalid option
    [Note: The above create table script is generated by CKM Oracle Knowledge Module].
    I am using CKM Oracle KM for the Primary key constraint in My target Oracle Table. I think the Problem is somewhere else.
    Please Help.

Maybe you are looking for

  • Error While Creating DB link

    Hi All, My OS: Windows Server 2003 DB Version: 10.2.0.1 I created a Public Database Link on my server so that user can access the database using database link. The command i issued is create public database link 10g_11g_link connect to test identifie

  • Importing Hi8 video into iMovie with ADVC 300 converter

    Anyone know optimal settings for picture quality with this device? Am importing PAL analogue video with this device. Secondly, when importing into iMovie, the event video window matches the aspect of the viewing window on the old Hi8 camera. In other

  • SOAP Adapter - NullPointerException in SOAPAdapterBean.java

    <b>XI Version and Service Pack:</b> 3.0 SP15 <b>Testing tool:</b> SAP SOAP Client <b>Request:</b> <?xml version="1.0" encoding="UTF-8"?> <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">   <SOAP:Body>      <test>Test1</test> </SO

  • Thinkpad T43p doesn't turn on

    Hello, I have my T43p since 4 years ago, always it worked perfect, but recently, suddenly, sometimes it doesn't turn on;  I plug onto the AC adapter, y remove the battery without success... all leds is turned off ... there are two times that it happe

  • Ora-01861 error

    I am getting ora-01861 error in SQL developer. I did not get the error using TORA. I am at a loss as what to fix. I need to reformat a date. I am using TO_CHAR(PER.BIRTH_DATE, 'MM/DD/YYYY') AS BIRTH_DATE, The birth date is dd-mmm-yy and I MUST be abl