Issues with Sequence Generator

I'm having trouble with Sequence generator not generating continuous numbers starting from 1, each time I run the mapping.
I want the Sequence to start from 1, each time the mapping is run. For this to happen, I'm using a pre-mapping operator which uses an oracle procedure to reset the sequence.
But, the sequence generates the numbers from some weird number, say 3508 and then jumps to 5006 and so on. I'm not able to track what's wrong with the sequence. I have stopped the caching in Sequence but still it hasn't helped. I'm sure and have verified that the procedure being used to reset the sequence is running fine.
Please suggest some additional parameters/properties at OWB level to be checked for the sequence, if any OR any thoughts on why the sequence is not starting from 1. Thanks in advance.
Thanks,
Sachin
Edited by: 850549 on Apr 23, 2011 11:43 AM
Edited by: 850549 on Apr 23, 2011 11:44 AM

Could you check whether the sequence you use has a cache value greater than 1 defined in the database. This way if your database regularly should be stoped, e.g for offline backup, you'll loose the sequence values that were unused in memory at that time. That way the gaps in your surrogate ids would be explainable.

Similar Messages

  • JBoss Clustering | Issue with sequence generator

    Hi all,
    I am facing a strange issue. I have 2 instances of jboss on the same machine and we have a number of stateless session beans used in our application. Now, I have written a Stateless session bean for sequence generator. I am able to run it on one instance but it is failing on another instance (even if I am only this running this one instance).
    It gives the following error:
    com.proximities.common.utils.SequenceIdGeneratorUtil: Method: getSequence(): Message: TableKey : VENUE
    2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: utils.SequenceIdGeneratorUtil: Method: getSequence(): Message: Fetching from sequence proxy factory: VENUE
    2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getInitialContext: Message: Using JNDI initial context: org.jnp.interfaces.NamingContextFactory
    2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getInitialContext: Message: Using JNDI URL: jnp://localhost:11099
    2005-08-02 11:19:58,406 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getInitialContext: Message: Using JNDI initial context prefix: org.jboss.naming:org.jnp.interfaces
    2005-08-02 11:19:58,421 DEBUG [com.proximities] Class: ejb.EJBLookupUtil: Method: getSequenceFacade: Message: SequenceStoreFacadeHome - Sequence store facade home returned from ejbHomeFactory isnull
    2005-08-02 11:19:58,421 FATAL [com.proximities] Class: ejb.EJBLookupUtil: Method: getSequenceFacade: Message: Exception during the invoking the remote interface
    2005-08-02 11:19:58,421 INFO [STDOUT] java.lang.NullPointerException
    2005-08-02 11:19:58,421 INFO [STDOUT] ejb.EJBLookupUtil.getSequenceFacade(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.getSequenceStore(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.reserveBlock(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.<init>(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] sequence.SequenceProxyFactory.getSequence(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] at common.utils.SequenceIdGeneratorUtil.getSequence(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] at dataaccess.VenueDAO.add(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] at dataaccess.VenueDAO.update(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] at dataaccess.common.GenericDataAccessManager.executeModify(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] at business.mediator.ManageVenueMediator.insertIntoVenues(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] at business.sessionfacade.VenueManagementFacadeEJBean.insertIntoVenues(Unknown Source)
    2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    2005-08-02 11:19:58,421 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:130)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:139)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.CleanShutdownInterceptor.invoke(CleanShutdownInterceptor.java:264)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
    2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    2005-08-02 11:19:58,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    2005-08-02 11:19:58,421 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
    2005-08-02 11:19:58,421 INFO [STDOUT] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
    2005-08-02 11:19:58,421 INFO [STDOUT] at $Proxy92.insertIntoVenues(Unknown Source)
    Now within the server logs, I can see that it has loaded and cached the home interface of that bean, but dont know why its not picking it up.
    Here are the logs for the same:
    [org.jboss.ejb.EjbModule] startService, starting container: SequenceStoreFacade
    [org.jboss.system.ServiceController] starting service jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB
    [org.jboss.ejb.StatelessSessionContainer] Starting jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB
    [org.jboss.ejb.StatelessSessionContainer] Begin java:comp/env for EJB: SequenceStoreFacade
    [org.jboss.ejb.StatelessSessionContainer] TCL: org.jboss.util.loading.DelegatingClassLoader@188d92e
    [org.jboss.ejb.StatelessSessionContainer] Bound java:comp/ORB for EJB: SequenceStoreFacade
    [org.jboss.ejb.StatelessSessionContainer] Bound java:comp:/HandleDelegate for EJB: SequenceStoreFacade
    [org.jboss.ejb.StatelessSessionContainer] End java:comp/env for EJB: SequenceStoreFacade
    [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] SequenceStoreFacade cannot be Bound, doesn't have local and local home interfaces
    [org.jboss.proxy.ejb.ProxyFactory] (re-)Binding Home ejb.SequenceStoreFacadeHome
    [org.jboss.proxy.ejb.ProxyFactory] Bound SequenceStoreFacade to ejb.SequenceStoreFacadeHome
    [org.jboss.system.ServiceController] starting service jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome
    [org.jboss.ejb.plugins.StatelessSessionInstancePool] Starting jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome
    [org.jboss.ejb.plugins.StatelessSessionInstancePool] Started jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome
    [org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:service=EJB,plugin=pool,jndiName=ejb.SequenceStoreFacadeHome dependent components: []
    [org.jboss.resource.connectionmanager.CachedConnectionInterceptor] start called in CachedConnectionInterceptor
    [org.jboss.ejb.StatelessSessionContainer] Started jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB
    [org.jboss.system.ServiceController] Starting dependent components for: jboss.j2ee:jndiName=ejb.SequenceStoreFacadeHome,service=EJB dependent components: []
    BTW, I am using JCS for caching and JBoss 4.0. Any pointers will be most appreciated?
    Thanks,
    Vikrant Verma

    You'll get a lot more help with this by posting this to the JBoss forums. This forum is about the J2EE SDK which uses the Sun Java System Application Server.
    -Ian Evans

  • Issue with sequence.currval in INSERT ALL...

    Hi Gurus,
    I am having an issue with using sequence.currval in INSERT ALL with WHEN clause.Please check following example
    Let say I have 4 tables
    1) SOURCE_PARENT
    PARENT_ID
    ========
    10
    20
    2) SOURCE_CHILD
    PARENT_ID CHILD_ID
    ========= ========
    10     1
    10     2
    20     1
    20     2
    Now i have another 2 tables same as above definition(DEST_PARENT, DEST_CHILD),which i want to populate with above source data with new parent_id's from a sequence.
    So I have used INSERT ALL as follows.
    =====================================================
    INSERT ALL
    WHEN (prev_parent_id = 0)THEN
    INTO dest_parent
    values(test_s.nextval)
    when 1 = 1 then
    INTO dest_child
    values(test_s.currval,child_id)
    select
    p.parent_id
    ,c.child_id
    ,LAG(c.parent_id, 1, 0) OVER (PARTITION BY c.parent_id ORDER BY c.child_id) prev_parent_id
    from
    source_parent p
    ,source_child c
    where
    p.parent_id = c.parent_id
    order by p.parent_id
    ========================================================
    Above INSERT ALL created following rows in DEST tables
    1) DEST_PARENT
    PARENT_ID
    =========
    75
    77
    2)DEST_CHILD
    PARENT_ID CHILD_ID
    ========= =======
    75     1
    76     2 --- this should be same as above record
    77     1
    78     2 --this should be same as above record
    As you can see test_s.nextval is executed 4 times even we do have WHEN Clause in INSERT ALL
    Can you please check what's wrong in this INSERT ALL statement?
    (or)
    Any otherway of doing these INSERTS in a single SQL statement?
    Any help would be appreciated!!
    Thanks
    srinivas.L

    Sorry, but this solution does not work. I had to remove the constraints on the two tables dest_parent and dest_child just to show you, how bad your solution is
    SQL> select * from source_parent;
    PARENT_ID
            10
            20
    2 rows selected.
    SQL> select * from source_child;
    PARENT_ID   CHILD_ID
            10          1
            10          2
            20          1
            20          2
            20          3
    5 rows selected.
    SQL> select * from dest_parent;
    no rows selected
    SQL> select * from dest_child;
    no rows selected
    SQL> insert all when
      2       (PREV_PARENT_ID = 0) then into DEST_PARENT
      3  values
      4       (TEST_S.nextval) when 1 = 1 then into DEST_CHILD
      5  values
      6       (case when PREV_PARENT_ID != 0 then TEST_S.currval - 1 else TEST_S.currval end,
      7        CHILD_ID)
      8       select P.PARENT_ID,
      9              C.CHILD_ID,
    10              LAG(C.PARENT_ID, 1, 0) OVER(partition by C.PARENT_ID order by C.CHILD_ID) PREV_PARENT_ID
    11       from SOURCE_PARENT P, SOURCE_CHILD C
    12       where P.PARENT_ID = C.PARENT_ID
    13       order by P.PARENT_ID
    14  /
    7 rows created.
    SQL> select * from dest_parent;
    PARENT_ID
            23
            26
    2 rows selected.
    SQL> select * from dest_child;
    PARENT_ID   CHILD_ID
            21          2   -- ??? !!!
            23          1
            23          2
            24          3   -- !!!
            26          1
    5 rows selected.
    SQL>

  • LR5.3 Export issue with Sequence Renumbering

    I just discovered an issue with the LR5.3 Export module on my Windows 7 system when exporting JPEG image files with 'Sequence' File renaming and 'Original' File Settings to a subfolder. When exporting approximately 100 JPEG image files LR shows a file count in the subfolder of ~1/2 the actual file count and the ability to 'Synchronize Folder' disappears. The correct number of files appear in the subfolder using Windows Explorer, so they all were successfully exported and renamed properly. LR must be closed and reopened to restore the ability to 'Synchronize Folders' and/or 'Import' images using the Import module. I've never encountered this problem before since I normally process raw image files, which do not exhibit this issue.
    Here are screenshots:

    Posted to the Photoshop Family site as a problem:
    http://feedback.photoshop.com/photoshop_family/topics/lr5_3_export_sequence_numbering_issu e

  • AJAX True Client issue with Load generator and BPM

    Hi every one,
    when i try to run Ajax True Client scrit from controller with Load Generator other than local machine,
    it is failing with an error "cannot find usr file". 
    Root Cause:
    this is because it is missing "webiendp.txt" file while copying the script to Load Generator machine. by placing this file manually in that location, its working fine.
    But in case of BPM we cannot do like that. BPM always make a copy of the script and after execution it clean up the entire folder.
    is there any settings to copy the entire folder to BPM/LG location, with out missing "webiendp.txt"?
    thanks in advance.

    This question seems like it's better suited to the [url http://forums.oracle.com/forums/forum.jspa?forumID=561]JRockit forum
    John

  • 9.2 issue with  Sequence Numbers

    We are using OWB 9.2 and RDBMS 9.2 on windows NT.
    When using set based functionality i.e. Merge Statement, or Row Based, we have noticed that our sequence object gets incremented during updates even though it is only associated with the insert and not the update.
    Is this normal behaviour or an issue ???

    Jagadish,
    You will not get updates because you by default match on the keys on the table. In other words you emp_id and the seq.nextval are matched to what you have in the table and they will never match (because of the nextval).
    Two things you can do:
    - Change the composite key (e.g. change the design)
    - Change the configuration in OWB
    Let's look at the second one, what you must do is the following:
    1) On the target table, select operator properties and find "Match by Constraint". Highlight that and change this setting to No Constraints.
    You now are not using the constraint, so you must tell OWB what to match on. You do this by:
    2) Highlight the EMPID column and select attribute properties
    3) In the loading properties node set the following for EMPID:
    Load column when inserting row => Yes
    Load column when updating row => No
    Match column when updating row => Yes
    4) Highlight the other columns, for example ATTEMPT_COUNT and select attribute properties
    5) In the loading properties node set the following for ATTEMTP_COUNT:
    Load column when inserting row => Yes
    Load column when updating row => Yes
    Match column when updating row => No
    This should allow you to update based on the EMPID alone.
    Hope this helps,
    Jean-Pierre

  • Namespace issue with oracg generated classes

    Hi,
    I'm having problems generating classes with oracg from the Java Xdk from an XML schema. All classes are generated, but do not compile. In some sources (mostly in the type classes) "public void addSomething(null.Something theSomething)" is generated as the method declaration, and that doesn't compile. When I add a targetnamespace to the xsd file, the generated sources compile (the 'null.' is replaced with 'myPackage.', but when I generate an XML document, I contains a namespace reference (ns1) like this:
    <ns1:Note xmlns:ns1 = "http://www.somewhere.org">
    <ns1:Form>
    <ns1:Reference>
    <ns1:ReferenceNbr>1</ns1:ReferenceNbr>
    <ns1:ReferenceType>1</ns1:ReferenceType>
    </ns1:Reference>
    </ns1:Form>
    </ns1:Note>
    What I want is this:
    <Note>
    <Form>
    <Reference>
    <ReferenceNbr>1<ReferenceNbr>
    <ReferenceType>1<ReferenceType>
    </Reference>
    </Form>
    </Note>
    How can I get this result ?
    Kind regards.

    Did you try adding the the XmlSeeAlso annotation to the webservice
    @XmlSeeAlso({<package.name>.AccountIC.class})
    This will add the schema for the data type (AccountIC) to the WSDL.
    Hope this helps.
    -Ajay

  • Issue with sequence

    Hi!
    I created a sequence:
    CREATE SEQUENCE "XXX"."FLIGHT_LEG_SEQ"
    MINVALUE 0 MAXVALUE 100000 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER CYCLE ;
    Sequence after inserting a row into table:
    CREATE SEQUENCE "XXX"."FLIGHT_LEG_SEQ"
    MINVALUE 0 MAXVALUE 100000 INCREMENT BY 1 START WITH 24 CACHE 20 NOORDER CYCLE ;
    Here is the trigger that uses this sequence:
    create or replace TRIGGER NEW_LEG_ID
    BEFORE INSERT ON FLIGHT_LEGS
    FOR EACH ROW
    BEGIN
    SELECT flight_leg_seq.NEXTVAL INTO :new.leg_id
    FROM dual;
    END;
    The sequence is set to increment by 1, however the next value is 24? What could be the reason for this?
    Thanks!

    > Let's don't waste each other's time with my first post.
    Correctly said. If you yourself are not sure about what you have typed, I should really retire from this thread. By the way, am not wasting your time, was trying to help you out. Oracle never does anything wrong. Its a computer program. So there should be something wrong with your code only.
    Cheers
    Sarma.

  • I have a editing issue with (sequence) rating system in Bridge.

    So I am editing in Bridge staring each keeper photo and as I do so the newly rated or 1 star photo I just  marked skips ahead in front of the  next photo. So in other words lets say I rated or stared photo number 1278 and the next one is 1279 and after marking 1278 it goes in front of 1279 reversing the sequence? What is causing this to happen. Also yesterday a whole batch of photos from a shoot (3500 of them) lost all time sequence ( I am viewing as "Date created" reverted to one time rather than when they were actually shot much later. I had two hardrives of the same photos and on my backup folder on the other hard drive this did not occur. Unfort I had edited almost the whole corrupted folder so going back to the clean back up HD was not what I wanted to do. Any ideas on this. the files that converted to the wrong date created also have a  out of focus quality as if the file is opening but never clears up.

    DOes tha make sense? Before you had me reset it I could
    scroll thru in bridge and use just single key grading actions  and now I must
    use command Action.
    Your Bridge set up must have been really messed because the normal behavior
    to set rate and label has always been with the two key combination when in a
    workspace with content window set up. When in content panel pressing a key
    without command brings you straight to the file (or first in series) with
    the first character that equals the key you pressed. If you have a filename
    starting with 3 pressing the key 3 for 3 star rating would move the focus
    from your selected file and bring you straight to that other file with a
    name starting with 3.
    However you could also use other options. Not only slideshow allows you to
    use one key, also the full screen (hit space bar to get there) or the Review
    mode (hit cmd+B to get there) in both mode you can move the files with arrow
    key and use one key for rate or label.
    two key  action such as COMMAND 1 to make it a 1 star or COMMAND 6 to make it
    this makes for allot more work and more carpal tunnel 
    nightmare lol!
    It is also not more work to hit one ore two keys at the same time and using
    the cmd + . (dot) and Cmd+ , (comma) also increases or decreases your rating
    with one star.
    Carpal tunnel syndrome is nothing to laugh about but highly unlikely to get
    from using a key board.
    There must be a fucntion to make thsi change?
    No, there is not.

  • 3.3EA1 Issues with report generator interfaces

    Trying to build out a few reports in the EA version and noticing a few issues:
    1. When you first launch the report wizard the template drop down and manage button are greyed out. If you click another option from the available reports tab then they become active.
    2. If I pick a Template, then select a Report Configuration, the Template gets blanked out and disappears from the drop down list. So I can't use a report configuration (having selected a few sub views or specific tables) and a custom template? I have to exit the report builder and re-enter to get the Template drop down to re-appear.
    Thanks.

    Hi Kent,
    We saw this bug and it's already fixed.
    Thanks.

  • Issue with Generate Create Script in new ODT 11.1.0.5.10 beta

    So I'm trying to determine if there's an issue with the Generate Create Script option in the new ODT 11.1.0.5.10 beta (when you right click on a table in Server Explorer).
    The SQL create script that it generates lacks the slash between lines. For example I generated the create script for my User table and this is what was generated:
    CREATE TABLE "DEV"."SYSTEM_USER_TB" ("RID" NUMBER(10,0),"USER_NAME" VARCHAR2(256 CHAR),"APPLICATION_RID" NUMBER(10,0),"FIRST_NAME" VARCHAR2(256 CHAR),"LAST_NAME" VARCHAR2(256 CHAR),"PW" VARCHAR2(128 CHAR),"PW_FORMAT" NUMBER,"PW_SALT" VARCHAR2(128 CHAR),"LAST_ACTIVITY_DT" DATE,"EXPIRATION_DT" DATE,"EMAIL" VARCHAR2(256 CHAR),"PW_QUESTION" VARCHAR2(256 CHAR),"PW_ANSWER" VARCHAR2(256 CHAR),"APPROVED_FLG" NUMBER(1,0),"LOCKED_OUT_FLG" NUMBER(1,0),"LAST_LOGIN_DT" DATE,"LAST_PW_CHANGED_DT" DATE,"LAST_LOCKOUT_DT" DATE,"FAILED_PW_ATTEMPT_CNT" NUMBER(6,0),"FAILED_PW_ATTEMPT_WINSTART" DATE,"FAILED_PW_ANSW_ATTEMPT_CNT" NUMBER(8,0),"FAILED_PW_ANSW_ATTEMPT_WINSTRT" DATE,"CREATED_BY_RID" NUMBER(10,0),"CREATED_DT" DATE,"MODIFIED_BY_RID" NUMBER(10,0),"MODIFIED_DT" DATE) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 131072 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033033" PRIMARY KEY ("RID") USING INDEX "DEV"."XPKSTAFF" ENABLE VALIDATE )
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033032" CHECK ("RID" IS NOT NULL) ENABLE VALIDATE )
    CREATE TRIGGER "DEV"."SYSTEM_USER_TRG1"
    BEFORE
    INSERT
    ON "DEV"."SYSTEM_USER_TB"
    FOR EACH ROW
    begin
         select SYSTEM_USER_SEQ.nextval into :new.RID from dual;
    end;
    In my new Oracle Database Project, if I right click on the script and select "Run" or "Run On", the script fails saying:
    Connected.
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ERROR at line 2:
    ORA-00922: missing or invalid option
    If I then add, a slash between lines, the script runs successfully and creates the table/trigger and whatever else just fine. For example, I changed the above generated code to look as follows:
    CREATE TABLE "DEV"."SYSTEM_USER_TB" ("RID" NUMBER(10,0),"USER_NAME" VARCHAR2(256 CHAR),"APPLICATION_RID" NUMBER(10,0),"FIRST_NAME" VARCHAR2(256 CHAR),"LAST_NAME" VARCHAR2(256 CHAR),"PW" VARCHAR2(128 CHAR),"PW_FORMAT" NUMBER,"PW_SALT" VARCHAR2(128 CHAR),"LAST_ACTIVITY_DT" DATE,"EXPIRATION_DT" DATE,"EMAIL" VARCHAR2(256 CHAR),"PW_QUESTION" VARCHAR2(256 CHAR),"PW_ANSWER" VARCHAR2(256 CHAR),"APPROVED_FLG" NUMBER(1,0),"LOCKED_OUT_FLG" NUMBER(1,0),"LAST_LOGIN_DT" DATE,"LAST_PW_CHANGED_DT" DATE,"LAST_LOCKOUT_DT" DATE,"FAILED_PW_ATTEMPT_CNT" NUMBER(6,0),"FAILED_PW_ATTEMPT_WINSTART" DATE,"FAILED_PW_ANSW_ATTEMPT_CNT" NUMBER(8,0),"FAILED_PW_ANSW_ATTEMPT_WINSTRT" DATE,"CREATED_BY_RID" NUMBER(10,0),"CREATED_DT" DATE,"MODIFIED_BY_RID" NUMBER(10,0),"MODIFIED_DT" DATE) TABLESPACE "USERS" PCTFREE 10 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 131072 MAXEXTENTS 2147483645 MINEXTENTS 1 )
    CREATE UNIQUE INDEX "DEV"."XPKSTAFF" ON "DEV"."SYSTEM_USER_TB" ("RID" ) TABLESPACE "USERS"
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033033" PRIMARY KEY ("RID") USING INDEX "DEV"."XPKSTAFF" ENABLE VALIDATE )
    ALTER TABLE "DEV"."SYSTEM_USER_TB" ADD ( CONSTRAINT "SYS_C0033032" CHECK ("RID" IS NOT NULL) ENABLE VALIDATE )
    CREATE TRIGGER "DEV"."SYSTEM_USER_TRG1"
    BEFORE
    INSERT
    ON "DEV"."SYSTEM_USER_TB"
    FOR EACH ROW
    begin
         select SYSTEM_USER_SEQ.nextval into :new.RID from dual;
    end;
    So, does anyone know if this is a bug? Could I be missing an option to add in the slashes to the generated code? Is there an option to not require the slashes? Could there be another way to execute these scripts?
    Seriously, I think I'm having deja vu from the last release of the Dev Tools: Generate Create Script creates scripts that won't run: ORA-00922: missing..
    ...except this time the documentation says I should be able to use the "Run" and "Run On" commands in the Oracle Database Project (see page 8): http://www.oracle.com/technology/tech/dotnet/pdf/ODT11_whatsnew.pdf
    null

    There are 2 issues in the generated script :
    1. Missing semicolons at the end of the create stmts
    2. Missing slashes
    Both of these fixes will be available in the ODT 11.1 release.

  • Can a sequence generate negative numbers?

    Hi
    Thank you for reading my post
    i think my sequence generate negative numbers , is it possible ?or somewhere in my application is incorrect ?
      CREATE SEQUENCE  "HR"."GLOB_SEQ"  MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 5 NOCACHE  ORDER  NOCYCLE ;is there anything that i made wrong which caused the negative numbers in my edit box ?
    type of my category_ID is number.
    Thanks

    Generally speaking yes you can generate negative numbers:
    SQL> create sequence seq1 increment by -1;
    Sequence created.
    SQL> select seq1.nextval from dual;
    NEXTVAL
    -1
    SQL> /
    NEXTVAL
    -2
    But if you have defined minvalue as 1 it is impossible because:
    SQL> create sequence seq1 increment by -1 minvalue 1 maxvalue 1000000 start with 1;
    Sequence created.
    SQL> select seq1.nextval from dual;
    NEXTVAL
    1
    SQL> /
    select seq1.nextval from dual
    ERROR at line 1:
    ORA-08004: sequence SEQ1.NEXTVAL goes below MINVALUE and cannot be instantiated
    SQL>
    So most probably someone simply inserted a row with negative values knowing that they'll never be in conflict with sequence generated values, or your code is buggy :)
    Generally for surrogate keys (assuming this is your case) you don't care what values they have.
    Gints Plivna
    http://www.gplivna.eu

  • Issue with getting sequance number from db in EO for a primary key column

    Hello Experts,
    we are working on ADf 11.1.1.2.
    we are facing issue with sequence number in our UAT instance.
    dev instance and sit instances did not gave any issues.
    We have one EO in that for one attribute we have given the value as
    new oracle.jbo.server.SequenceImpl("XXOZF_QA_CODE_S", object.getDBTransaction())).getSequenceNumber()
    in order to get the primary key column value from db sequance .
    <TransientExpression><![CDATA[(
    new oracle.jbo.server.SequenceImpl("XXOZF_QA_CODE_S", object.getDBTransaction())).getSequenceNumber()
    ]]></TransientExpression>
    now the issue is "I have incremented the sequence number through SQL plus from 10 to 20. And created a record on a VO which is based on above EO.
    But the sequence iam getting is 11 instead of 21."
    This is happening only in our uat instance all other instances are working fine.
    Can any one tell us how this frame work is still pointing tho the old sequnce number.
    regards
    Gayaz

    Also make sure that your sequence has NOCYCLE option.
    some thing like this:
    CREATE SEQUENCE test_seq
    START WITH 1
    INCREMENT BY 1
    NOCACHE
    NOCYCLE;

  • We are having issues with WLS 5.1   pdf   SSL

    We are running IE 5.0 and above browser with our application and the server is Weblogic 5.1 We are having issues with a generated pdf being sent down from the server using the response outputStream in an SSL connection. We tried setting the content type before getting the outputstream. IE comes back with a dialog for download. When we select either of the options IE comes back with "Unable to download <url> from <server>. We are using WLS 5.1 service pack 6. Any help will be greatly appreciated
              

              I tried this option, but did not help. We have two weblogic servers on different
              machines. One works fine in downloading pdf file over https, but not the other.
              The error we are getting after selecting it to save it to a file:
              IE cannot download xx.pdf from www.xxx.com
              From the link, when we say "save target as", we get different error as:
              This file could not be written to cache.
              Someone suggested to pass "pragma: public" or "pragama: no-cache" in the header.
              But we are just simply serving it as a file, neither from servlet nor from jsp.
              So I suspect it something to do with our weblogic proxy or security configuration.
              Any ideas/help is much appreciated.
              Thanks
              Jayashree Raghavan <[email protected]> wrote:
              >If you ever have a similar problem it might help to check in browser
              >settings.
              >In IE goto tools/internet options/
              >Goto advanced Tab
              >go down to Security.
              >Uncheck the "donot save encrypted pages to disk".
              >This will make downloading a pdf work in ssl.
              >
              >
              >Jayashree Raghavan wrote:
              >
              >> We resolved this problem thanks to Maxim, by commenting out the code
              >that sends to the browser not to cache these pdf files. response.setHeader("Pragma",
              >"no-cache");
              >
              

  • Problem with sequences after import

    We recently imported some table data from QA to DEV and now the DEV database has issues with sequences errors. How can I resolve the problem with sequences since we have constraint violation errors as a result of the table sequences being out of sync after the import of several schema tables.

    We run a script like the following to get the sequences as close as possible after importing from PROD to DEV:
    set serveroutput on;
    DECLARE
         CURSOR CUR IS
              SELECT      otherdb_seq.sequence_owner AS owner,
                        otherdb_seq.sequence_name AS seq_nm,
                        TO_CHAR(otherdb_seq.last_number) AS start_nr
              FROM           dba_sequences currdb_seq,
                        dba_sequences@prod otherdb_seq
         WHERE      currdb_seq.sequence_owner IN ('~schemaname~') AND
                        currdb_seq.sequence_owner = otherdb_seq.sequence_owner AND
                   currdb_seq.SEQUENCE_NAME = otherdb_seq.sequence_name
              ORDER BY      1, 2;
         sql_string VARCHAR2(500);
    BEGIN
         FOR REC IN CUR
         LOOP
         sql_string := 'DROP SEQUENCE '||REC.owner||'.'||REC.seq_nm;
              DBMS_OUTPUT.PUT_LINE(sql_string||';');
              EXECUTE IMMEDIATE sql_string;
              sql_string := 'CREATE SEQUENCE '||REC.owner||'.'||REC.seq_nm;
              sql_string := sql_string ||' START WITH '||REC.start_nr;
              sql_string := sql_string ||' MAXVALUE 999999999999999999999999999';
              sql_string := sql_string ||' MINVALUE '||REC.start_nr;
              sql_string := sql_string ||' NOCYCLE NOCACHE ORDER';
              DBMS_OUTPUT.PUT_LINE(sql_string||';');
              EXECUTE IMMEDIATE sql_string;
              sql_string := 'DROP PUBLIC SYNONYM '||REC.seq_nm;
              DBMS_OUTPUT.PUT_LINE(sql_string||';');
              EXECUTE IMMEDIATE sql_string;
              sql_string := 'CREATE PUBLIC SYNONYM '||REC.seq_nm||' FOR '||REC.owner||'.'||REC.seq_nm;
              DBMS_OUTPUT.PUT_LINE(sql_string||';');
              EXECUTE IMMEDIATE sql_string;
              sql_string := 'GRANT SELECT ON '||REC.owner||'.'||REC.seq_nm||' TO PUBLIC';
              DBMS_OUTPUT.PUT_LINE(sql_string||';');
              EXECUTE IMMEDIATE sql_string;
         END LOOP;
    END;

Maybe you are looking for

  • Using Crystal Reports in Visual Basic 2010

    I am trying to add several Crystal Reports to a new project and having a major problem.  Here's the situation. I created a new Visual Basic 2010 project with only one form, In visual Basic I added Crystal Reports.   I then imported a form that was cr

  • Connection problems with the Olite database

    Hi, I have a problem when I want to execute a BPEL Process from the process manager. I get a java.sql.SQLException with the following message "[POL-3207] a corrupted data page was detected". The fact is that another person (with his own account) inst

  • Spry image gallery

    Hi there, just a question, I created a spry image gallery successfully with thumbnails on the left and the bigger image and details on the right, my problem is its created it with all the thumbs going down vertically after looking everywhere i havent

  • Mimic Photoshop's Bevel & Emboss layer style in Illustrator - how?

    Having searched for topics akin to my question, I have only really found tips on how to achieve a bevel and emboss on type. Here's what I'm trying to create... all using CS4... I have an artwork, all in Illustrator so far. It has background images of

  • App store error message on Macbook (2010)

    I'm trying to download an app from the App Store and receiving this error message: "We could not complete your request. There was an error in the App Store. Please try again later. (4)". I've tried clearing the caches in iTunes and that didn't help.