This discussion is archived
1 2 Previous Next 24 Replies Latest reply: Jul 27, 2012 6:05 AM by user10366531 RSS

Issues in AWT cache Group

user10366531 Newbie
Currently Being Moderated
Hi,
I have installed TT in RAC 11g environment.
two AWT cache group is created . both are loaded in TT too.
Now From Application , Perfoming insert.
after complete the insert it is obeserved that for one table, i can view the data in Timesten .
but for another table the insert is only there in oracle. Not in timesten.
Can anyone guide me for same?

Thanks
  • 1. Re: Issues in AWT cache Group
    Gennady Sigalaev Journeyer
    Currently Being Moderated
    Hi user10366531,

    Could you please post the code you've executed?

    regards,
    Gennady
  • 2. Re: Issues in AWT cache Group
    user10366531 Newbie
    Currently Being Moderated
    CREATE asynchronous writethrough CACHE GROUP CUST_BAL_RESERVATION
    FROM TBLCUSTOMERBALANCERESERVATION"
    (
    "BALANCERESERVATIONID" NUMBER NOT NULL ,
    "RESERVATIONIDENTIFIER" VARCHAR2(1000 BYTE) NOT NULL ,
    "RESCREATEDATETIME" DATE,
    "LASTUPDATEDATETIME" DATE,
    "CUSTOMERID" NUMBER NOT NULL ,
    "RESERVATIONSTATUS" NUMBER NOT NULL ,
    "CUSTOMERBALANCEID" NUMBER,
    "TOTALRESERVATION" NUMBER,
    "USEDVALUE" NUMBER,
    "UNUSEDVALUE" NUMBER,
    PRIMARY KEY ("BALANCERESERVATIONID"))

    i have created above AWT cache group now from application,

    i am inserting in

    Insert into TBLCUSTOMERBALANCERESERVATION (BALANCERESERVATIONID,RESERVATIONIDENTIFIER,RESCREATEDATETIME,LASTUPDATEDATETIME,CUSTOMERID,RESERVATIONSTATUS,CUSTOMERBALANCEID,TOTALRESERVATION,USEDVALUE,UNUSEDVALUE)
    values (3776203,'loadtest_onlymonetory10009',to_date('25-JUL-12','DD-MON-RR'),to_date('25-JUL-12','DD-MON-RR'),10009,1,10010,10000,null,null);

    but above insert will go directly into oracle.I am not able to see in TT.
  • 3. Re: Issues in AWT cache Group
    Gennady Sigalaev Journeyer
    Currently Being Moderated
    Could you please post the PassThrough settings? Do you use this feature?

    regards,
    Gena
  • 4. Re: Issues in AWT cache Group
    user10366531 Newbie
    Currently Being Moderated
    yes Passthrough = 1

    We need this feature.
  • 5. Re: Issues in AWT cache Group
    Tim Vincent Explorer
    Currently Being Moderated
    As a test run the INSERT with PASSTHROUGH=0 to check you have no syntax errors against TimesTen and that you are doing the insert as the correct table owner.
  • 6. Re: Issues in AWT cache Group
    user10366531 Newbie
    Currently Being Moderated
    i can not go with passthrogh = 0 option becasue application will not up.some synonyms are used from Oracle while up the application with Timesten.
  • 7. Re: Issues in AWT cache Group
    Tim Vincent Explorer
    Currently Being Moderated
    OK the suspicion is that there is some syntax error in your insert statement or the application is using the wrong user name which means with PassThrough=1 it will get pushed down to the Oracle database and executed there which is why you don't see the insert in TimesTen. So as a test are you able to run the following in ttIsql or SQLDeveloper connected to TimesTen to see where the problem is?

    passthrough=0;
    Insert into TBLCUSTOMERBALANCERESERVATION (BALANCERESERVATIONID,RESERVATIONIDENTIFIER,RESCREATEDATETIME,LASTUPDATEDATETIME,CUSTOMERID,RESERVATIONSTATUS,CUSTOMERBALANCEID,TOTALRESERVATION,USEDVALUE,UNUSEDVALUE)
    values (3776203,'loadtest_onlymonetory10009',to_date('25-JUL-12','DD-MON-RR'),to_date('25-JUL-12','DD-MON-RR'),10009,1,10010,10000,null,null);
  • 8. Re: Issues in AWT cache Group
    user10366531 Newbie
    Currently Being Moderated
    This works perfectly fine.When I am inserting in Timesten it insert in TT and as well Oracle .

    But From Application, it can not insert in TT.it directly goes to oracle.Although AWT cache group is created.

    Edited by: user10366531 on Jul 27, 2012 12:21 AM
  • 9. Re: Issues in AWT cache Group
    user10366531 Newbie
    Currently Being Moderated
    INSERT INTO TBLCUSTOMERBALANCERESERVATION(BALANCERESERVATIONID,TOTALRESERVATION,CUSTOMERBALANCEID,RESERVATIONIDENTIFIER, RESERVATIONSTATUS,RESCREATEDATETIME,LASTUPDATEDATETIME,CUSTOMERID) VALUES(SEQ_BALANCERESERVATIONID.NEXTVAL,10000.0,3,'loadtest_onlymonetory2',1,sysdate,sysdate,2);


    Not able to insert data with sequence.nextvalue.
  • 10. Re: Issues in AWT cache Group
    Gennady Sigalaev Journeyer
    Currently Being Moderated
    Hi user10366531,
    Not able to insert data with sequence.nextvalue
    If you use PassThrough=1 then if TimesTen cannot parse a SELECT statement because it includes keywords that do not exist in TimesTen SQL or because it includes syntax errors, it passes the statement to the Oracle database (http://docs.oracle.com/cd/E11882_01/timesten.112/e21634/operations.htm#TTCAC291).

    You need to create required sequence in TimesTen and after that you will see the row in TimesTen.

    regards,
    Gennady
  • 11. Re: Issues in AWT cache Group
    user10366531 Newbie
    Currently Being Moderated
    How to load sequence ? is there any pass through setting for sequences ?
  • 12. Re: Issues in AWT cache Group
    user10366531 Newbie
    Currently Being Moderated
    i am inserting in TT with oracle sequences only.Do i need to create all indexes which are there in oracle ?
  • 13. Re: Issues in AWT cache Group
    ChrisJenkins Guru
    Currently Being Moderated
    What you are trying to do is not possible. You need to understand that:

    1. TimesTen cannot 'cache' oracle sequences. You can create sequences in TimesTen but they are completely separate from any sequences in Oracle.

    2. Any single SQL statement is executed entirely in TimesTen or entirely in Oracle. You cannot reference Timesten and oracle objects in the same SQL statement.

    3. Transactions in TimesTen and in Oracle are separate. if, in a single transaction, you execute some statements in TimesTen and some (via PassThrough), in Oracle then you really have two separate and unrelated transactions on your connection; one in Timesten and one in oracle. When you commir (or rollback) both will be comitted (or rolled back). If however one commit succeeds and one fails then you may get inconsistencies.

    What you need to do is create a TimesTen sequence to use for these inserts. At the moment because the sequence is missing and you have got PassThrough=1 set everythign is being executed directly in Oracle.

    Chris
  • 14. Re: Issues in AWT cache Group
    ChrisJenkins Guru
    Currently Being Moderated
    With regard to your question on indexes... Depending on what SQL you are executing against this table in TimesTen you may not need all the indexes that are present in Oracle. But for sure, if you are doing anything other than INSERT, you will probably need some indexes. You need to look at the SQL and evaluate which indexes are needed to best support those statements and then create them in TimesTen.

    Chris
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points