Creation of Sequences in Oracle

Hi
If i want to create large number of sequences around 30 to 35 sequences in a single database,Is there any performance down in oracle server or any limitation?
Please explain if so ! As in next project we are going to create around 30 to 35 sequences.
Thanks in advance
Raj..

Raj
Sequences shouldnt degrade the performance theoritically. Because , they will not be activated unless you do explicitly. They are not
like any daemon programs or background processes running . So it should be ok .
As long as you can manage that large number of Sequences it should be fine.
prakash

Similar Messages

  • Firing sequence of Oracle forms 6.0 triggers

    Hi All,
    Pls tell anyone what is the sequence of trigger firing in oracle 6.0 (oracle apps).
    Thanks in advance

    Hi,
    Please see if these links/docs help.
    Note: 61675.1 - Trigger Execution Sequence in Oracle Forms
    firing sequence of triggers in oracle forms
    http://tinyurl.com/2wyffj6
    Thanks,
    Hussein

  • Dropped sequences in oracle 10g

    Hi All,
    Can we get back the dropped sequences in oracle 10g?
    Command?
    Thanks.
    Edited by: user545846 on Apr 9, 2009 7:32 AM

    Thanks. Oracle site is accessible.
    This user has the dba previleges to select all tables. but still getting this error message:
    SQL> SELECT * FROM dba_sequences AS OF TIMESTAMP systimestamp - 1/24;
    SELECT * FROM dba_sequences AS OF TIMESTAMP systimestamp - 1/24
    ORA-01031: insufficient privileges
    Please give your comment.

  • Generate alphanumeric sequence using oracle sequence

    Hi,
    Can we generate alphanumeric sequence from Oracle sequence.
    Sequence would be something like this. Please advice
    TEMP-0001
    TEMP-0002
    TEMP-0010
    Thanks,
    Lak

    hi,
    You can try below procedure...
    SQL> create sequence sec
      2  minvalue 0
      3  start with 001
      4  increment by 1
      5  nocache;
    Sequence created.
    SQL> select 'temp-'||to_char(sec.nextval) from dual;
    'TEMP-'||TO_CHAR(SEC.NEXTVAL)
    temp-1

  • How long should the Repository Creation Utility take for Oracle Portal?

    I'm running the Oracle Repository Creation Utility (RCU) as a precursor to installing WebCenter, and the schema creation process is stuck on the "Portal" step. The first 10-12 steps each took less than 30 seconds to complete, and the last step has been going for 2 hours 14 minutes.
    I checked the rcu log files, and they are constantly being updated with new progress information as though the process is still working. I haven't been able to find anyone else on the internet with this problem. From various screenshots on google, it looks like it can complete in under 10 minutes in some cases.
    Thanks,
    Dave

    Is it showing some error ?
    Check with DB settings and parameters properly.Usaully it should not take long time to complete.Possible chances are corrupt rcu file.I would suggest download again the RCU and re-run it.
    Anyways in which version of DB you are trying to install ?(vendor and version).
    Which version of RCU you are using ?
    Regards,
    Hoque

  • Drop/Create sequence using Oracle Job Scheduler

    IDE for Oracle SQL Development: TOAD 9.0
    Question: I am trying to do the following:
    1. Check if a certain sequence exists in the user_sequences table
    2. Drop the sequence if it exists
    3. Re-create the same sequence afterward
    All in a job that is scheduled to run daily at 12:00 AM.
    What I would like to know is if this is even possible in the first place with Oracle jobs. I tried the following:
    1. Create the actual "BEGIN...END" anonymous block in the job.
    2. Create a procedure that uses a dynamic SQL string using the same "BEGIN...END" block that drops and recreates the sequence using the EXECUTE IMMEDIATE commands
    But I have failed on all accounts. It always produces some sort of authorization error which leads me to believe that DDL statements cannot be executed using jobs, only DML statements.
    BTW, by oracle jobs, I mean the SYS.DBMS_JOBS.SUBMIT object, not the job scheduler.
    Please do not ask me why I need to drop and recreate the sequence. It's just a business requirement that my clients gave me. I just want to know if it can be done using jobs. If not, I would like to know if there are any work-arounds possible.
    Thank you.

    Please do not ask me why I need to drop and recreate the sequence. It's just a business requirement that my clients gave me. I just want to know if it can be done using jobs. If not, I would like to know if there are any work-arounds possible.Well, I won't ask you then, but can you ask your clients why on earth they would want that?
    Do they know that doing DDL 'on the fly' will invalidate the dependent objects?
    Best shot you can give at it is reset the sequence. And you could do it in a job, yes, as long as it's interval is during some maintenance window (no active users).
    Regarding resetting a sequence, you, (and your clients) should read this followup:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:1119633817597
    (you can find lots more info on sequences and jobs by doing a search from the homepage http://asktom.oracle.com)
    Regarding the authorization errors: your DBA should be able to provide you the nessecary privileges.
    But in the end, this is something I'd rather not would like to see implemented on a production system...

  • How to call sequence in Oracle Forms

    Hi,
    I am using Oracle Developer Suite 10g. I want to call a sequence that I have created in SQL Plus. When I try to call the sequence in a trigger for a command button (WHEN-BUTTON-PRESSED) the compiler tells me that the sequence cannot be used in this context. I am passing the sequence to a procedure as a parameter. Let me show you some code:
    My table is:
    Location(loc_id, loc_name);
    primary key is loc_id
    My sequence is:
    CREATE SEQUENCE loc_seq
    MINVALUE 1
    MAXVALUE 999999
    START WITH 1
    INCREMENT BY 1
    CACHE 20;
    My procedure is:
    CREATE OR REPLACE PROCEDURE loc_change (v_loc_id IN Location.loc_id%TYPE, v_loc_name IN Location.loc_name%TYPE) AS
    BEGIN
    INSERT INTO Location(Location.loc_id, Location.loc_name)
    VALUES (v_loc_id, v_loc_name);
    COMMIT;
    END loc_change;
    My WHEN-BUTTON-PRESSED trigger is
    BEGIN
    loc_change(loc_seq.nextval, :DATA_BLOCK.VARIABLE);
    END;
    All that I need to do is generate a random number for the parameter passed that is the primary key for Location, from within my trigger. Any thoughts?

    This
    DECLARE
      nSeq number;
    BEGIN
      select loc_seq.nextval
      into nSeq
      from dual;
      loc_change(nSeq, :DATA_BLOCK.VARIABLE);
    END;should do the job...
    you can also put the fetching of the sequence into the database procedure. if you have DB Version 11g, you can reference the sequence simply by this:
    nSeq := loc_seq.nextval;in prior 11g you have to fetch it using select into from dual.
    regards

  • Creation of Schema in Oracle after checking

    All,
    My sincere apologies to post this here, but I did not find the answer anywhere.
    I have a task to convert some SQL Server Scripts to Oracle.
    The below is the sql server script to create the schema called HRMS after checking whether it is existing or not.
    IF NOT EXISTS (SELECT [schema_id] FROM [sys].[schemas] WHERE [name] = N'HRMS')
    BEGIN
    EXECUTE ('CREATE SCHEMA [HRMS] AUTHORIZATION [dbo];');
    END
    GO
    Can we have any similar kind of solution / statement in oracle. Please help me.
    When I read in the Oracle Docs, CREATE SCHEMA statement is just to bundle multiple sql statements to a single transaction.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6014.htm
    2)
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[HRMS].[TBL_PMapping]') AND type in (N'U'))
    DROP TABLE [HRMS].[TBL_PMapping]
    GO
    This statement is to check whether the table called 'TBL_PMapping is exists or not and, if exists then drop it. Please suggest me a similar approach/ how to achieve the same with in Oracle.
    First need to check whether the table exists or not, if exists then drop it other wise create it.
    I would request for your kind help in this. Thank you very much in advance.
    Thanks,

    968217 wrote:
    All,
    My sincere apologies to post this here, but I did not find the answer anywhere.
    I have a task to convert some SQL Server Scripts to Oracle.
    The below is the sql server script to create the schema called HRMS after checking whether it is existing or not.
    IF NOT EXISTS (SELECT [schema_id] FROM [sys].[schemas] WHERE [name] = N'HRMS')
    BEGIN
    EXECUTE ('CREATE SCHEMA [HRMS] AUTHORIZATION [dbo];');
    END
    GO
    Can we have any similar kind of solution / statement in oracle. Please help me.
    When I read in the Oracle Docs, CREATE SCHEMA statement is just to bundle multiple sql statements to a single transaction.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6014.htm
    2)
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[HRMS].[TBL_PMapping]') AND type in (N'U'))
    DROP TABLE [HRMS].[TBL_PMapping]
    GO
    This statement is to check whether the table called 'TBL_PMapping is exists or not and, if exists then drop it. Please suggest me a similar approach/ how to achieve the same with in Oracle.
    First need to check whether the table exists or not, if exists then drop it other wise create it.Oracle is NOT SQL Server, and doesn't work like SQL Server. It may be acceptable in SQL Server to drop and create tables on-the-fly, but in Oracle it's considered poor database design. There shouldn't be any need to drop and recreate tables at run time, and it would likely drop dependencies from other database objects or triggers, constraints, indexes, grants etc.
    If you need a "temporary table" in Oracle, you create a Global Temporary Table just once and use it for your session. This is a special kind of table where the data in it is only visible to the session that inserts it (multiple sessions only see their own data), and that data is automatically removed upon commit or when the session ends, depending on how you configure the table at the time of creation.

  • How to create a sequence in oracle forms6i

    Oracle forms 6i
    Hai All
    I am working in leave application entry so i need to create a sequence for giving a unique number for each entry
    Pls tell me the steps how to created and how to call the sequence from database
    Thanks in Advance
    Srikkanth.m

    Hi,
    Create sequence <sequence_name>
    Start with <number>
    increment by <number>
    in database
    eg:- create sequence test_seq
    start with 1
    increment by 1;
    in forms
    you can assign value in pre-insert trigger
    Declare
    cursor cur_seq is
    select test_seq.nextval from dual;
    begin
    open cur_seq;
    fetch cur_seq into :item_key ; /* :item_key give name of ur primary key field*/
    close cur_seq;
    end;

  • Wrong sequencing with Oracle db using sequence table?

    Hi,
    we have a strange problem resulting in primary key violations in a table which is using a sequence (no native sequencing, but a sequence table).
    We use Oracle 9.2.0.x
    We have a table which is mapped to a Java type which has two derived types, i. e. in the table, two different "object types" are contained (the table contains all attributes of both classes). This table uses a sequence key as primary key.
    This works pretty fine when the table is left empty in the beginning.
    However, if we fill 15 records in this table by a SQL script - not by toplink! - (for migration purposes), and then set the initial sequence value in the sequence table to 500 (which should be greater than 15 ;-) by the same SQL script, then restart the application server (Bea Weblogic), and then try to add new records via Toplink, we get a primary key violation.
    It sounds odd but it seems as if Toplink would store the initial sequence value somewhere else and does not care about the value we entered "manually" in the sequence table.
    Can anybody give us a hint what the reason could be for this problem? Is it the inheritance of the Java Types from one abstract type? Does sequence number caching play a role (we used a preallocation size of 500 and of 1 - with the same negative effect).
    If you need additional information, don't hesitate to drop me a notice.
    Thanks,
    Andreas.

    Each time the application using TopLink starts it will lazily acquire the next pre-allocation batch of values from the database.
    You will see SQL entries like:
    UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 50 WHERE SEQ_NAME = 'EMP_SEQ'
    SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = 'EMP_SEQ'
    TopLink will increment the table's value and then use the values from 1 greater then initial value up to and including the value it just incremented the row to.
    In your example you should see, after re-starting the server, the next value to be 501.
    What exact version of TopLink are you using?
    When you enable SQL logging what statement do you see executed, related to the sequence table prior to the invalid INSERT?
    Doug

  • Picking sequence in oracle outbound

    Hello,
    We are using wms cartonization while picking for outbound. The requirement is to have a picking sequence in such a way that, the heavier items are picked first and lighter items are picked later. Can I sequence the picking tasks based on the physical attributes of the items? How can this be handled?
    Thanks,
    Simon

    You can use the SequenceImpl helper class. In the docs: 8.3.1.2 Eagerly Defaulting an Attribute Value from a Database Sequence
    // In WarehouseEOImpl.java
    import oracle.jbo.server.SequenceImpl;
    // Default WarehouseId value from WAREHOUSE_SEQ sequence at entity row create time
    protected void create(AttributeList attributeList) {
        super.create(attributeList);
        SequenceImpl sequence = new SequenceImpl("WAREHOUSE_SEQ",getDBTransaction());
        setWarehouseId(sequence.getSequenceNumber());Timo

  • Sequence on Oracle Database column

    Hi All,
    In my scenario I have to insert data/records into a Oracle Database.The Database table has primary key with Sequence(sequence will generate next unique value for the new record to be inserted). So how can I insert the records into that table. I have created JDBC receiver message type for that particular table.
    Please let me know the possible ways.
    Thanks
    Praveen Kumar

    Using Stored Proecdure is one option.Write a stored procedure that takes the rest of the column values as inputs and then uses the sequencne plus these values to insert data into the datbase.
    Can you provide an example of how the insert query with the Call to the Sequence looks so that a standard insert option can also be looked into?
    Regards
    Bhavesh

  • ASM creation problem Initializing the Oracle ASMLib driver:  failed

    hi
    oel 5.6 64bit
    db 11gR2 64bit
    [root@rac-1 ASM]# rpm -qa | grep ora
    oracleasm-2.6.18-164.el5xen-2.0.5-1.el5
    libtheora-1.0alpha7-1
    oracleasm-2.6.18-164.el5debug-2.0.5-1.el5
    oracleasm-2.6.18-164.el5-2.0.5-1.el5
    oracle-logos-4.9.17-10
    oracle-validated-1.1.0-7.el5
    oraclelinux-release-5-6.0.1
    oracleasm-support-2.1.4-1.el5
    [root@rac-1 ASM]# rpm -qa | grep asm
    nasm-0.98.39-3.2.2
    oracleasm-2.6.18-164.el5xen-2.0.5-1.el5
    oracleasm-2.6.18-164.el5debug-2.0.5-1.el5
    oracleasm-2.6.18-164.el5-2.0.5-1.el5
    oracleasm-support-2.1.4-1.el5
    [root@rac-1 ASM]#
    [root@rac-1 ASM]# oracleasm configure
    ORACLEASM_ENABLED=true
    ORACLEASM_UID=oracle
    ORACLEASM_GID=asmadmin
    ORACLEASM_SCANBOOT=true
    ORACLEASM_SCANORDER=""
    ORACLEASM_SCANEXCLUDE=""
    [root@rac-1 ASM]# service oracleasm restart
    Dropping Oracle ASMLib disks:                              [  OK  ]
    Shutting down the Oracle ASMLib driver:                    [  OK  ]
    Initializing the Oracle ASMLib driver:                     [FAILED]
    [root@rac-1 ASM]#can anyone help??

    hi
    just another confirmation i need :
    i have some raw devices using /etc/rawdevices file and losetup to /dev/loop(n); can you say what are the udev rules to set so that all the permission and loop(n) devices come up before ASMLib driver initialization ?? eg.
    http://www.idevelopment.info/data/Oracle/DBA_tips/Automatic_Storage_Management/ASM_20.shtml
    [root@rac-1 ~]# oracleasm listdisks
    VOL1
    [root@rac-1 ~]# oracleasm createdisk VOL2 /dev/loop1
    Unable to access device "/dev/loop1"
    [root@rac-1 ~]# losetup /dev/loop1 /oracle_ASM_SWAP/ASM/ASM_FILE1
    [root@rac-1 ~]# oracleasm createdisk VOL2 /dev/loop1
    Writing disk header: done
    Instantiating disk: done
    [root@rac-1 ~]# losetup /dev/loop2 /oracle_ASM_SWAP/ASM/ASM_FILE2
    [root@rac-1 ~]# oracleasm createdisk VOL3 /dev/loop3
    Unable to access device "/dev/loop3"
    [root@rac-1 ~]# oracleasm createdisk VOL3 /dev/loop2
    Writing disk header: done
    Instantiating disk: done
    [root@rac-1 ~]# losetup /dev/loop3 /oracle_ASM_SWAP/ASM/ASM_FILE3
    [root@rac-1 ~]# oracleasm createdisk VOL4 /dev/loop3
    Writing disk header: done
    Instantiating disk: done
    [root@rac-1 ~]# losetup /dev/loop4 /oracle_ASM_SWAP/ASM/ASM_FILE4
    [root@rac-1 ~]# oracleasm createdisk VOL5 /dev/loop5
    Unable to access device "/dev/loop5"
    [root@rac-1 ~]# oracleasm createdisk VOL5 /dev/loop4
    Writing disk header: done
    Instantiating disk: done
    [root@rac-1 ~]# losetup /dev/loop5 /oracle_ASM_SWAP/ASM/ASM_FILE5
    [root@rac-1 ~]# oracleasm createdisk VOL6 /dev/loop5
    Writing disk header: done
    Instantiating disk: done
    [root@rac-1 ~]# oracleasm listdisks
    VOL1
    VOL2
    VOL3
    VOL4
    VOL5
    VOL6
    [root@rac-1 ~]#http://admindba.com/forum.php?gcm=2&grid=115612
    assigning to /etc/rc.local making the disk available only VOL1 not others.
    can i still use ADVM ??
    [oracle@rac-1 dbs]$ . ~/.orcl_ASM.profile
    [oracle@rac-1 dbs]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 4 11:34:51 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> !
    [oracle@rac-1 dbs]$ ls
    hc_orcl.dat   init.ora      lkORCL     spfileorcl.ora
    init+ASM.ora  initorcl.ora  orapworcl
    [oracle@rac-1 dbs]$ exit
    SQL> startup
    ORA-01078: failure in processing system parameters
    ORA-29701: unable to connect to Cluster Synchronization Service
    SQL> startup pfile='/oracle_db/oracle/product/11.2.0/dbhome_1/dbs/init+ASM.ora';
    ORA-29701: unable to connect to Cluster Synchronization Service
    ORA-01078: failure in processing system parameters
    SQL> Disconnected
    [oracle@rac-1 dbs]$ cd /oracle_db/oracle/product/11.2.0/dbhome_1/bin/l
    lbuilder      ldapcompare   ldapsearch    loadpsp       lxchknlb
    lcsscan       ldapdelete    ldifmigrator  loadpspO      lxegen
    ldapadd       ldapmoddn     linkshlib     lsnodes       lxinst
    ldapaddmt     ldapmodify    lmsgen        lsnrctl
    ldapbind      ldapmodifymt  loadjava      lsnrctl0
    [oracle@rac-1 dbs]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 4 11:47:18 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> create spfile from pfile='/oracle_db/oracle/product/11.2.0/dbhome_1/dbs/init+ASM.ora';
    File created.
    SQL> startup
    ORA-29701: unable to connect to Cluster Synchronization Service
    SQL> Disconnected
    [oracle@rac-1 dbs]$ vi .orcl_ASM.profile
    [oracle@rac-1 dbs]$ vi .orcl_ASM.profile
    [oracle@rac-1 dbs]$ . .orcl_ASM.profile
    [oracle@rac-1 dbs]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 4 11:50:29 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> startup mount
    ORA-29701: unable to connect to Cluster Synchronization Service
    SQL> Disconnected
    [oracle@rac-1 dbs]$ ls
    hc_orcl.dat   init.ora      lkORCL     spfile+ASM.ora
    init+ASM.ora  initorcl.ora  orapworcl  spfileorcl.ora
    [oracle@rac-1 dbs]$ vi init+ASM.ora
    [oracle@rac-1 dbs]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 4 11:51:25 2011
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL>  create spfile from pfile='/oracle_db/oracle/product/11.2.0/dbhome_1/dbs/init+ASM.ora';
    File created.
    SQL> startup mount
    ORA-29701: unable to connect to Cluster Synchronization Service
    SQL>how to get rid of ORA-29071 for this new ASM instance creation??
    http://www.oracledba.org/10g/asm/asm_install.html
    this is 10g related.
    kind regards

  • Creation of sequence in etext template

    Hi All,
    I am creating a custom etext template for a invoice payment which will be forwarded to bank.
    The file will be generated for each invoice payment made one at a time.
    So, I have a requirement where in need to generate a sequence number in of the fields of the extext template. When the first file is send to bank, the sequence should be 1, for the second run the sequence should display 2 and so on.
    Here we cannot use the <RESET AT LEVEL> as RECORD or LEVEL as we need to control the sequence outside the etext template and in the database. So, I believe we should use PERIODIC_SEQUENCE that controls the value in database level.
    My question is how to achieve the relation between the database value and the etext template value.
    ex:
    <DEFINE SEQUENCE> allrecordsequence
    <RESET AT LEVEL> PERIODIC_SEQUENCE
    <INCREMENT BASIS> /outboundtransaction/paymentsequence[sequencename=allrecordsequence]/lastvalue + 1
    <END DEFINE SEQUENCE> allrecordsequence
    In the etext template
    sequence(allrecordsequence)
    The value in the etext template is always generation as 1, as the database record paymentsequence/lastvalue is null.
    Here is the user guide notes:
    Reset at Level
    The reset at level subcommand defines where the sequence resets its starting number. It is a mandatory subcommand. For example, to number the payments in a batch, define the reset at level as Batch. To continue numbering across batches, define the reset level as RequestHeader.
    In some cases the sequence is reset outside the template. For example, a periodic sequence may be defined to reset by date. In these cases, the PERIODIC_SEQUENCE keyword is used for the reset at level. The system saves the last sequence number used for a payment file to the database. Outside events control resetting the sequence in the database. For the next payment file run, the sequence number is extracted from the database for the start at number (see start at subcommand).
    But the sequence value in the database is not getting incremented.
    Appreciate an early response as it is really urgent.
    Thank you in advance.

    I have developed the solution using the below approach-
    Requirement - ( My requirement was a little different to what was mentioned above)
         To generate a sequence number in the e-text template of a invoice payment file.
         In a day when the first file is send to the bank, the sequence should be 1, for the second file the sequence should be 2.
         For the next day run the sequence value should be reset to 1.
    Approach 1) Use the IBY_FD_EXTRACT_EXT_PUB hook and Use sequence in the e-text template.
    GET_INS_EXT_AGG procedure is called once only for the payment instruction.
    It will add XML data element under OutboundPaymentInstruction tag.
    Add a new XML tag with the successful count of the formatted payments in a day.
    SQL query.
    SELECT COUNT (1)
    INTO v_payment_count
    FROM iby_payments_all a
    WHERE UPPER (a.org_name) = <org_name>
    AND UPPER (a.payment_profile_sys_name) =
    'profile system name'
    AND TRUNC (a.creation_date) = TRUNC (SYSDATE)
    AND a.payment_service_request_id <
    (SELECT MAX (b.payment_service_request_id)
    FROM iby_payments_all b);
    In the e-text template use the sequence number
    <DEFINE SEQUENCE>     RecordSeq1
    <RESET AT LEVEL>     OutboundPaymentInstruction
    <INCREMENT BASIS>     LEVEL
    <START AT>          1
    <END DEFINE SEQUENCE >     RecordSeq1
    While referring to the sequence use :- SSPN_PAYMENT_COUNT + SEQUENCE_NUMBER(RecordSeq1)
    to get the latest count of payment files.
    Approach 2) Using payment system
    <DEFINE SEQUENCE>      RecordsSeq1
    <RESET AT LEVEL>      PERIODIC_SEQUENCE
    <INCREMENT BASIS>      LEVEL
    <START AT> /PaymentSequence[SequenceName=’RecordsSeq1’]/LastValue + 1
    <END DEFINE SEQUENCE > RecordsSeq1
    By using a PERIODIC_SEQUENCE it will periodically generate the numbers.
    SEQUENCE_NUMBER(RecordsSeq1) is used to generate the number.
    I believe we need to have a payment system defined and associate the same to a Payment Process Profile.
    Only then can it have association with the last sequence number in the database.
    Please correct me if the Approach#2 set up is incorrect.
    Since Payment system was not necessary for the payment profile that we have used I have used approach 1
    Approach 2 can be used as a guideline :)

  • Creation of sequence and trigger for each table!!!!!!!1

    Hi
    I am new to trigger and Sequence field. In one of my database we have many tables with fields for specifing ID numbers. Iam planning to insert the ID field with help of a Sequence and trigger...that trigger fires by adding the sequence value from the dual table. Now the point is here we r having around *60* table with ID field. And i am planning use the above process for each table by creating sequences and trigger for each table.
    Will this affects the performance of database.
    Is there any other option other than the above process, I mean other than creating sequences and trigger for each table.
    PLzz help to resolve this issuee......
    Shiyas
    Edited by: user13170361 on Jun 7, 2010 12:37 AM

    Tiger, I didn't mind about your comment, but the point is try to use
    select NVL(max(a) + 1,1) into i from p1_temp;This line in your trigger code and see what is happening. The problem is with your trigger. You are using group by function and you will not get no_data_found !
    For more help, this is some modification of your code.
    SQL> create table p1_temp (a number(10) primary key, b number(10));
    Table created.
    SQL> create or replace trigger trg_p1_temp
      2  before insert on p1_temp for each row
      3  declare
      4  i number(10);
      5  begin
      6  begin
      7  select NVL(max(a) + 1,1) into i from p1_temp;
      8  exception
      9  when no_data_found then
    10  i := 1;
    11  end;
    12  :new.a := i;
    13  end;
    14  /
    Trigger created.
    SQL> insert into p1_temp(b) values (1);
    1 row created.
    SQL> insert into p1_temp(b) values (2);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from p1_temp;
             A          B
             1          1
             2          2
    SQL> Edited by: Saubhik on Jun 7, 2010 2:30 AM

Maybe you are looking for

  • Using vba in Oracle Forms 6i

    Hello I'm working with Oracle Forms 6i and I need to check if a certain folder exists before I make an action, I think there's no way to do it with Oracle Forms only, so I tough doing it with vba. Is there some controller that allow me to use vba in

  • Can't detect boot device after factory format to new HDD

    First off, I have an HP Pavilion G6 that I purchased in December 2012. Yesterday I decided to get a new HDD to upgrade it and start fresh. It's a 1TB SSD+HDD hybrid by Seagate. It installed without a hitch, and I used my HP recovery CDs to do a facto

  • How do I connect Macbook Air to Macbook via ethernet crossover cable?

    Hi all, For the life of me, I'm having a lot of troubles connecting my Macbook Air to Macbook, here is what I've done so far: 1. Turned on sharing in System preferences on both systems and given "read and write" access to "myself", "users" and "every

  • Sound import problem

    I have already imported some sounds (mp3) into a Flash file but I'm having a problem replacing them. In the properties of the sound when I try to import a new version I just get a 'sound import failed' error. It works fine on one of them but on the o

  • Executing operating system command within trigger or procedure

    Hello Can some one help me out as how to execute operating system command (unix or windows ex.. stop,start,cc,del or copy etc...) in a trigger or procedure. My requirement is, if some predefined error occure then listener listener should be stopped a