JPA: Oracle Sequence Generator not up to date

Hi,
I'm using the JPA Oracle Sequence Generator in one of my JPA classes:
@Entity
@Table(name = "DACC_COST_TYPE")
public class JPACostType implements Serializable {
@SequenceGenerator(name = "CostTypeGenerator", sequenceName = "DACC_COST_TYPE_SEQ")
    @Column(name = "ID_COST_TYPE")
    @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CostTypeGenerator")
    private Integer idCostType;
In order to persist a new object I perform the following code:
@PersistenceContext
private EntityManager em;
JPACostType myJPA = new JPACostType();
myJPA.setIdCostType = null;
em.merge(myJPA);
em.flush();
Normally this works fine. But after deploying the app there sometimes happens an error:
Caused by: javax.persistence.PersistenceException: SQLException while inserting entity {com.karmann.dacc.ejb.busilog.jpa.JPACostType(idCostType=4)}.
at com.sap.engine.services.orpersistence.core.PersistenceContextImpl.flush(PersistenceContextImpl.java:278)
at com.sap.engine.services.orpersistence.core.PersistenceContextImpl.beforeCompletion(PersistenceContextImpl.java:565)
at com.sap.engine.services.orpersistence.entitymanager.EntityManagerImpl.beforeCompletion(EntityManagerImpl.java:410)
at com.sap.engine.services.orpersistence.environment.AppJTAEnvironmentManager.beforeCompletion(AppJTAEnvironmentManager.java:197)
at com.sap.engine.services.ts.jta.impl.TransactionImpl.commit(TransactionImpl.java:232)
... 52 more
Caused by: java.sql.SQLException: ORA-00001: unique constraint (AEMA.DACC_COST_TYPE_PK) violated
Obviously JPA does not fetch the new key by accessing the Oracle sequence. This documents "next value = 5". Does JPA fetch the new key from its cache? Is there any possibility to avoid this?
Thanks for each hint,
Christoph

Hello Christoph Schäfer  ,
I am stuck with a similar issue. I was able to save mutiple entries and there has not been much change to my JPA. I added new entities and new sequences.
Now, I get the error Caused by: javax.persistence.PersistenceException: java.sql.SQLException: ORA-02289: Sequence ist nicht vorhanden.
I have checked the name of sequence and sequence next val on the DB. It works on DB but when i execute it from ejb, it gives me thsi error. Now, it gives the error for all previously working JPA entities.
I have also provided allocationSize = 1 for all entities.
Please let me know, possible cause/solution to this issue.
thank you.
Regards,
Sharath

Similar Messages

  • Java persistence: sequence generator not working in expected way.

    Hi,
    I just played around with java persistence api and found that sequence generator annotations for making new primary key value not working correctly in my code. following is part of my code related to this problem.
    in entity class:
    @SequenceGenerator(name="mySeq", sequenceName="MY_SEQ_IN_DB")
    @Id
    @GeneratedValue(strategy=SEQUENCE, generator="mySeq")
    @Column(name = "UPLOAD_ID", nullable = false)
    private Integer uploadId;
    I have a sequence called MY_SEQ_IN_DB in my oracle 9i testing db. When I ran the code to save a new entity instance to database I found that the new upload id is not the one that should be created from the MY_SEQ_IN_DB sequence, while the sequence was not increased either. It's instead something starting from 97 (in my pc), and increased just like a sequence, but every time I reran my code the sequence restarted itself again beginning with 97(of course the insert failed with primary key conflict). the behavior just looks like it's a sequence created and managed totally by the persistence api or toplink itself (I guess).
    So, my question is, is this a designed behavior or have I done something wrong to make it not using the correct sequence in the db?
    I used hibernate before, and assigning new primary key from sequence in this way works fine.
    Thanks
    JC.L

    There are some things in Java which can't be serialized. When contained within a higher-level class such as Buttons. A button can be associated with an Action Listener. Now, you can serialize a button; however you can't serialize an action listener - for what should be to you obvious reasons. This is NOT an error and so there is no need to throw an exception when serializing the button.
    Basically: Applet sends servlet button, but not listener.

  • 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.

  • Strange scenario,Oracle can not display the data in mysql correctly

    I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
    -------mysql------------
    mysql> create table tst(id int,name varchar(10));
    Query OK, 0 rows affected (0.00 sec)
    mysql> insert into tst values(1,'a');
    Query OK, 1 row affected (0.00 sec)
    mysql> select * from tst;
    ------------+
    | id | name |
    ------------+
    | 1 | a |
    ------------+
    1 row in set (0.00 sec)
    mysql> show create table tst\G
    *************************** 1. row ***************************
    Table: tst
    Create Table: CREATE TABLE `tst` (
    `id` int(11) DEFAULT NULL,
    `name` varchar(10) DEFAULT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    1 row in set (0.00 sec)
    -------------oracle ------------------
    SQL> select count(*) from "tst"@mysql;
    COUNT(*)
    49
    SQL> select * from "tst"@mysql;
    id
    1
    SQL> desc "tst"@mysql;
    Name Null? Type
    id NUMBER(10)

    You can make the following query on the result page:
    "select * from the_table where movietitle = ? and cinema = ?"
    then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
    Below is the sample code, it assumes you have a connection to the database:
    PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
    stat.setString(1, usersMovieTitleSelection);
    stat.setString(2, usersCinemaSelection);
    ResultSet res = stat.executeQuery();
    if (res.next()) {
    out.print("The movie is available");
    } else {
    out.print("The movie is not available");
    }Now just add that to your JSP page. Enjoy ! =)

  • Oracle 817 client not available in ODBC Data Source Administrator pick list...

    I have installed Oracle 817 client on a PC.
    I can see the server, I can see the instance.
    I can log into the instance using SQLPlus with no problem.
    The product I'm using requires an ODBC connection configured in the ODBC Data Source Administrator.
    When I try to configure it in the DSA, Oracle 8 is not in the list.
    HELP!

    I assume you have Windows on the client. The "Drivers" page of the ODBC_DSA should list all installed drivers. You require:
    name= Oracle ODBC Driver
    version= 8.01.07.00 (or something similar)
    company= Oracle Corporation DO NOT USE the Microsoft one.
    If this does not show, then either it was not included in the Oracle Client installation or you have not rebooted after the Oracle Client installation; the ODBC driver is not visible until rebooted.

  • Latest Javadocs on oracle.ldap not up to date

    I'm having a problem with the ldapclnt9.jar that comes with JDeveloper 9.0.5.1 The javadoc posted here:
    http://download-east.oracle.com/docs/cd/B10464_02/manage.904/b10423/index.html
    are not up to date (even though it shows 10g(904)). The oracle.ldap.util.Subscriber constructor has been deprecated (compile time warnings), however the above latest javadoc does not document this. Now I don't know what to use instead of Subscriber to get an oracle.ldap.util.User object?
    Any ideas?

    You have to use the 9.0.4.2 SDK with OID 9.0.4.2. To put it in another way you cannot use 10.1.2 SDK to create a subscriber (REALM) in 9.0.4.2.
    regards,
    --Olaf                                                                                                                                                                                                                                                                                                                                       

  • Contract Terms-Document sequence was not found for generating clause number

    Hi All,
    I am in very strange situation and not able to find out the solution for below problem.
    when i am trying to create clause number from Contracts Terms --> Contract Terms Library : Clauses , i found below error.
    " Document sequence was not found for generating clause number. Check the document sequence setup."
    where i have setup the document sequence setup? Please help me how to resolve this issue.
    Thanks in advance.
    Edited by: user627525 on Feb 8, 2011 7:25 AM

    Hi,
    I have the same error when trying to create clause number from Contracts Terms --> Contract Terms Library : " Document sequence was not found for generating clause number. Check the document sequence setup."
    Would you like to tell me how did you solve it, please?
    Regards,
    tinar

  • Oracle.DataAccess does not show up in VS 2008 list of data providers

    Hi
    I have an application which uses VB .Net 3.5 on Win 7 64bit machine with Oracle11gR2 64bit client in the machine.
    The problem I am facing is that Oracle.DataAccess does not come up under the Data provider drop downs in VS 2008.
    I have checked that the dll is actually present in C:\oracle\11gR2client64bit\odp.net\bin\2.x and I can also see the installed entry for the Dll in C:\Windows\assembly with the correct version.
    Am I missing something?
    Any help would be appreciated, I have been stuck on this for 8 days now.

    Use ODP and ASp.Net provider during oracle client install. Compile as x86 for solution

  • Oracle.oc4j.admin.internal.DeployerException: Could not read jazn-data conf

    I have an J2EE application along. This application works fine in IDE(JDeveloper9i), but when I want to deploy the EARfile in Jdeveloper10g,it gives me nested Exception in the code according to the following message in the console:
    Wrote WAR file to C:\jdev1012\Workspaces\Workspace_STInstall\Pr_Dev_Aug05\deploy\webapp1.war
    Wrote EAR file to C:\jdev1012\Workspaces\Workspace_STInstall\Pr_Dev_Aug05\deploy\application1.ear
    Invoking OC4J admin tool...
    C:\jdev\jdk\jre\bin\javaw.exe -jar C:\jdev1012\j2ee\home\admin.jar ormi://strele01.idc.oracle.com:23791 admin **** -deploy -file C:\jdev1012\Workspaces\Workspace_STInstall\Pr_Dev_Aug05\deploy\application1.ear -deploymentName stinstall-ear
    Error: Deploy error: deploy failed!: ; nested exception is:
    com.evermind.client.orion.AdminCommandException: Deploy error: deploy failed!: ; nested exception is:
         oracle.oc4j.admin.internal.DeployerException: Could not read jazn-data config file: file:/C:/jdev1012/j2ee/home/application-deployments/stinstall-ear/jazn-data.xml for stinstall-ear (C:\jdev1012\j2ee\home\application-deployments\stinstall-ear\jazn-data.xml (The system cannot find the file specified))
         at com.evermind.client.orion.DeployCommand.execute(DeployCommand.java:98)
         at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminConsole.java:121)
         at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java:30)
    java.rmi.RemoteException: deploy failed!: ; nested exception is:
         oracle.oc4j.admin.internal.DeployerException: Could not read jazn-data config file: file:/C:/jdev1012/j2ee/home/application-deployments/stinstall-ear/jazn-data.xml for stinstall-ear (C:\jdev1012\j2ee\home\application-deployments\stinstall-ear\jazn-data.xml (The system cannot find the file specified))
         oracle.oc4j.admin.internal.DeployerException: Could not read jazn-data config file: file:/C:/jdev1012/j2ee/home/application-deployments/stinstall-ear/jazn-data.xml for stinstall-ear (C:\jdev1012\j2ee\home\application-deployments\stinstall-ear\jazn-data.xml (The system cannot find the file specified))
         at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1602)
         at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1553)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
         at __Proxy0.deploy(Unknown Source)
         at com.evermind.client.orion.DeployCommand.execute(DeployCommand.java:95)
         at com.evermind.client.orion.Oc4jAdminConsole.executeCommand(Oc4jAdminConsole.java:121)
         at com.evermind.client.orion.Oc4jAdminConsole.main(Oc4jAdminConsole.java:30)
    Caused by: oracle.oc4j.admin.internal.DeployerException: Could not read jazn-data config file: file:/C:/jdev1012/j2ee/home/application-deployments/stinstall-ear/jazn-data.xml for stinstall-ear (C:\jdev1012\j2ee\home\application-deployments\stinstall-ear\jazn-data.xml (The system cannot find the file specified))
         at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:91)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.internalDeploy(DefaultApplicationServerAdministrator.java:378)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.deploy(DefaultApplicationServerAdministrator.java:278)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ---- Embedded exception
    oracle.oc4j.admin.internal.DeployerException: Could not read jazn-data config file: file:/C:/jdev1012/j2ee/home/application-deployments/stinstall-ear/jazn-data.xml for stinstall-ear (C:\jdev1012\j2ee\home\application-deployments\stinstall-ear\jazn-data.xml (The system cannot find the file specified))
         at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:91)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.internalDeploy(DefaultApplicationServerAdministrator.java:378)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.deploy(DefaultApplicationServerAdministrator.java:278)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ---- Embedded exception
    java.lang.InstantiationException: Could not read jazn-data config file: file:/C:/jdev1012/j2ee/home/application-deployments/stinstall-ear/jazn-data.xml for stinstall-ear (C:\jdev1012\j2ee\home\application-deployments\stinstall-ear\jazn-data.xml (The system cannot find the file specified))
         at com.evermind.server.XMLServerConfig.storeConfig(XMLServerConfig.java:1249)
         at com.evermind.server.XMLServerConfig.storeJAZNConfig(XMLServerConfig.java:1197)
         at com.evermind.server.XMLServerConfig.mkUserManager(XMLServerConfig.java:174)
         at com.evermind.server.XMLServerConfig.initUserManager(XMLServerConfig.java:333)
         at com.evermind.server.XMLServerConfig.initUserManagers(XMLServerConfig.java:240)
         at com.evermind.server.XMLServerConfig.postInit(XMLServerConfig.java:643)
         at com.evermind.server.deployment.EnterpriseArchive.postInit(EnterpriseArchive.java:1035)
         at com.evermind.xml.XMLConfig.init(XMLConfig.java:181)
         at com.evermind.server.ServerComponent.initDeployment(ServerComponent.java:317)
         at com.evermind.server.ServerComponent.copyAndDeploy(ServerComponent.java:386)
         at com.evermind.server.ServerComponent.initDeployment(ServerComponent.java:288)
         at oracle.oc4j.admin.internal.ApplicationDeployer.initArchive(ApplicationDeployer.java:283)
         at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:120)
         at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:73)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.internalDeploy(DefaultApplicationServerAdministrator.java:378)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.deploy(DefaultApplicationServerAdministrator.java:278)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ---- Embedded exception
    java.lang.InstantiationException: Could not read jazn-data config file: file:/C:/jdev1012/j2ee/home/application-deployments/stinstall-ear/jazn-data.xml for stinstall-ear (C:\jdev1012\j2ee\home\application-deployments\stinstall-ear\jazn-data.xml (The system cannot find the file specified))
         at com.evermind.server.XMLServerConfig.storeConfig(XMLServerConfig.java:1249)
         at com.evermind.server.XMLServerConfig.storeJAZNConfig(XMLServerConfig.java:1197)
         at com.evermind.server.XMLServerConfig.mkUserManager(XMLServerConfig.java:174)
         at com.evermind.server.XMLServerConfig.initUserManager(XMLServerConfig.java:333)
         at com.evermind.server.XMLServerConfig.initUserManagers(XMLServerConfig.java:240)
         at com.evermind.server.XMLServerConfig.postInit(XMLServerConfig.java:643)
         at com.evermind.server.deployment.EnterpriseArchive.postInit(EnterpriseArchive.java:1035)
         at com.evermind.xml.XMLConfig.init(XMLConfig.java:181)
         at com.evermind.server.ServerComponent.initDeployment(ServerComponent.java:317)
         at com.evermind.server.ServerComponent.copyAndDeploy(ServerComponent.java:386)
         at com.evermind.server.ServerComponent.initDeployment(ServerComponent.java:288)
         at oracle.oc4j.admin.internal.ApplicationDeployer.initArchive(ApplicationDeployer.java:283)
         at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:120)
         at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:73)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.internalDeploy(DefaultApplicationServerAdministrator.java:378)
         at com.evermind.server.administration.DefaultApplicationServerAdministrator.deploy(DefaultApplicationServerAdministrator.java:278)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Exit status of OC4J admin tool (-deploy): 1
    Elapsed time for deployment: 8 seconds
    #### Deployment incomplete. #### Aug 17, 2005 5:19:14 PM
    Does any one knows the cause of this exception??????????Plz. help
    Message was edited by:
    user446879

    Thanks....
    Contents of the orion-application.xml are below:
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0"?>
    <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://xmlns.oracle.com/ias/dtds/orion-application.dtd">
    <orion-application>
    <data-sources path="./data-sources.xml"/>
         <!-- mapping for realm "jazn.com" -->
    <security-role-mapping name="stonly">
              <group name="stonlys" />
         </security-role-mapping>
         <security-role-mapping name="stinternal">
              <group name="stusers" />
         </security-role-mapping>
         <security-role-mapping name="stadmin">
              <group name="stadmins" />
         </security-role-mapping>
    <security-role-mapping name="stinstallconfig">
              <group name="stinstallconfigs" />
         </security-role-mapping>
    <security-role-mapping name="stcalendar">
              <group name="stcalendars" />
         </security-role-mapping>
    <security-role-mapping name="stemail">
              <group name="stemails" />
         </security-role-mapping>
         <security-role-mapping name="stem">
              <group name="stems" />
         </security-role-mapping>
         <security-role-mapping name="stfile">
              <group name="stfiles" />
         </security-role-mapping>
         <security-role-mapping name="stintegclient">
              <group name="stintegclients" />
         </security-role-mapping>
         <security-role-mapping name="strtc">
              <group name="strtcs" />
         </security-role-mapping>
         <security-role-mapping name="stusearch">
              <group name="stusearchs" />
         </security-role-mapping>
         <security-role-mapping name="stcportlet">
              <group name="stcportlets" />
         </security-role-mapping>
         <security-role-mapping name="stwireless">
              <group name="stwires" />
         </security-role-mapping>
    <security-role-mapping name="stvmfax">
              <group name="stvmfaxs" />
         </security-role-mapping>
         <!-- use JAZN-XML by default -->
         <jazn provider="XML" location="./jazn-data.xml" />
         </orion-application>
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Plz. clarify about the listing of the EAR file you wants to have a look??

  • Data not getting inserted into oracle with theAutoCommitEnabled not checked

    Hello Experts
    I have a proxy to JDBC scenario.I have 3 SQL statements and the Format is
    <DeleteStatement>
    <InsertStatement>
    <CallStoredProcStatement>.
    While excecuting with the AutoCommitEnabled box checked, the insert statement is excecuting and the data is getting updated in the oracle database..But the CallStoredProcStatement is not excecuting.
    If the AutoCommitEnabled box not checked,the data is not getting updated in the database .but in RWB log all the SQL statements are getting executed successfully.
    Are there any other configurations still to be made in the JDBC adapter.

    Hi,
    Why you not using single SP to handle all the queries?
    BTW, have you used the parameter "logSQLStatement = true" in JDBC receiver channel? It will show in audit log what query is being executed.
    Regards,
    Neetesh

  • Cannot create new Data Source - Oracle ODBC does not show in System DSN

    On Windows 7 x64, Installed Oracle 10g to use ODBC to connect to Oracle database but am not able to create new data source as Oracle ODBC does not show in System DSN.... only shows SQL server etc etc...

    If you installed 32-bit Database Client, try the 32-bit ODBC admin tool: C:\Windows\SysWOW64\odbcad32.exe
    Note that 10.2.0.5 is the earliest "10g" version supported on Win 7.
    http://download.oracle.com/docs/cd/B19306_01/relnotes.102/b15680/toc.htm#BABEBBJF
    As an alternative, try the 11.2 Instant Client.
    For 32-bit apps: http://www.oracle.com/technetwork/topics/winsoft-085727.html
    64-bit/x64: http://www.oracle.com/technetwork/topics/winx64soft-089540.html

  • Oracle contracts generating incorrect start dates/pricing

    Hi,
    Oracle contracts generating incorrect start dates/pricing
    Semi Annual Invoices being automatically generated with the incorrect start date/pricing.
    We have 8 years of pricing instead of 6 yrs. Contracts are being terminated and recreated to correct immediate billing issues.
    Please help me out Why Oracle contracts generating incorrect start dates/pricing.
    Thanks In Advance,

    Which Apps release is this happening in?

  • 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

  • Cannot get Oracle sequence to be used with SQL Loader direct path load.

    I attempted to load approximately 3 million rows from a flat file into a 10g database using SQL Loader direct path load. In order to generate a primary key for each of these rows I used a simple SQL expression which gets the next number of an Oracle sequence and assigned that to my primary key column inside the control file. The strange thing is no primary key was generated for each of these columns as I see the sequence was not advanced. Furthermore when I try to run a query to find the count on those rows which have this column as NOT NULL ,I get the total of all the rows even though on inspection this column is empty in each of the rows.
    As far as I know, in the control file for a direct path load I am able to use a SQL Expression that returns simple scalar data which a NEXTVAL on a sequence does. (Oreilly Oracle SQL Loader The Definitive Guide p.184)
    Does anybody why my primary key was not generated and furthermore why is this column in a query appear to be NOT NULL when in fact it has nothing in it?

    Daniel,
    I appreciate your response alot.
    Now a follow on. You say that SQL*Loader is the fastest way to get data into Oracle Spatial even though the conventional path. How does SQL*Loader do this? Doesn't it use OCI?
    I just can't help but think that coverting my data to SQL*Loader format, and then having it parse it and send it to the database in some form must be slower than me just sending whatever SQL Loader sends to the DB myself using OCI. Am I missing something?
    The SQL Loader documentation seems to suggest that SQL*Loader just turns the input into alot of INSERT stateemnts. If so, can't I just do this?
    My performance with OCI and INSERT statements isn't very good, but I believe I am doing one transaction per insert. Might I be as well off to concentrate on fine tuning my OCI based code using INSERTs?
    I will actually do some time tests myself, but I would appreciate your opinion.
    Once again thanks for the great info you have provided.

  • Cannot allocate new log, sequence Checkpoint not complete

    Hi,
    Im having very frequent log switches and Im getting error as
    " cannot allocate new log, sequence Checkpoint not complete"
    I was having 3 redo log groups with 50 MB each. After I found this error in the alert log; I increased teh number of redo log groups to 6 with 50MB each. Still the issue is not getting resolved.
    Please suggest what will be the best solution for this.
    Following is a snippet from alertlog.
    ==================================================
    Sun Apr 19 09:14:08 2009
    Thread 1 advanced to log sequence 5811
    Current log# 2 seq# 5811 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
    Thread 1 cannot allocate new log, sequence 5812
    Checkpoint not complete
    Current log# 2 seq# 5811 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
    Sun Apr 19 09:14:18 2009
    Thread 1 advanced to log sequence 5812
    Current log# 3 seq# 5812 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
    Thread 1 cannot allocate new log, sequence 5813
    Checkpoint not complete
    Current log# 3 seq# 5812 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
    Thread 1 advanced to log sequence 5813
    Current log# 1 seq# 5813 mem# 0: /u01/app/oracle/oradata/mview/redo01.log
    Thread 1 cannot allocate new log, sequence 5814
    Checkpoint not complete
    Current log# 1 seq# 5813 mem# 0: /u01/app/oracle/oradata/mview/redo01.log
    Sun Apr 19 09:14:32 2009
    Thread 1 advanced to log sequence 5814
    Current log# 2 seq# 5814 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
    Thread 1 cannot allocate new log, sequence 5815
    Checkpoint not complete
    Current log# 2 seq# 5814 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
    Thread 1 advanced to log sequence 5815
    Current log# 3 seq# 5815 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
    Thread 1 cannot allocate new log, sequence 5816
    Checkpoint not complete
    Current log# 3 seq# 5815 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
    Sun Apr 19 09:14:44 2009
    =========================================================
    Regards
    Pratheej

    Anand... wrote:
    Hi Sir,
    Although i too had suggested increasing the redo logfile size, but after going through [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:69012348056] i was little confused as Tom has mentioned
    Another way is to make the log files smaller, hence increasing the frequency with which we checkpoint ---- Can you explain why so.
    I was a little surprised when I read that posting - but noticed it was dated May 2000 - when databases were still quite small and less busy. (And Tom suggested 25MB as being "modest" rather than "tiny" - which is probably what many people would call 25MB these days). And May 2000 probably means 8.0 or 8.1 - and the whole log buffer, redo generation, checkpointing technology has changed a lot since then.
    Basically, if you hit "checkpoint not complete", you need more online log space so that it's possible during the busiest times to keep generating redo log information while the checkpoint queues are being cleared far enough to allow older log files to be recycled.
    You can do this by adding more log files, or by increasing the sizes of the log files you use. Tom's point, I think, was that if you chose the option to add more files and kept them small (or even made them smaller) then the volume of dirty data blocks that you could create while filling a log file would be small, so the database writer wouldn't have to do much work to make each log file available for re-use. (I'm not sure I'd agree with the approach, though - even for 8i - because it could easily lead to an increase in the volume of datablocks written, even if it did bypass the checkpoint issue).
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "For every expert there is an equal and opposite expert."
    Arthur C. Clarke

Maybe you are looking for

  • Error while deploying struts application in tomcat

    Hi, I'm getting the following error when I start Tomcat using while auto-deploying a struts application. 2005-09-21 15:28:17 - ContextManager: Adding DEFAULT:/cna 2005-09-21 15:28:18 - Ctx(/cna) : Validating web.xml 2005-09-21 15:28:18 - Ctx(/cna) :

  • TimeMachine "Preparing backup..." Causing application memory space warning.

    Every night at the office, I run a script that rsyncs files from our production server to my local machine, as a backup just in case, and also until we get a git solution setup. I would then use Time Machine, setup on a partition on the main drive, t

  • Fail read filename from attachment in multipart message

    Hi, I use Javamail 1.4 for reading mail from imap server. Sometimes i have received mail with this header (this mail was produced with thunderbird): --------------040307090809070400040607 Content-Type: application/pdf; name*0="20060908 - DOCUMENT.pdf

  • After 6.0 update I can't get at synchronization activity boxes

    Hello, can anybody help me?  I have a Torch running 6.0.  it updated last night and ever since then the synchronization activity boxes appear to the top left hand side mostly off screen on my laptop.  This makes it almost impossible to accept/reject

  • Windowserver.log & sleep

    While looking for an answer to a sleep/crash problem, I was checking all the logs. I (think) I idenitfied the culprit by reading the windowserver.log. But there seem to be a lot of repeating errors in here, some of which repeat 10 or 15 times in a se