This discussion is archived
1 2 3 4 Previous Next 49 Replies Latest reply: Mar 11, 2011 7:11 AM by ChrisJenkins Go to original post RSS
  • 30. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    Hi Tim,

    I tried
    Command> load cache group coun_awt where countries.region_id >0 commit every 256  rows;
    0 cache instances affected.

    and when i tried:
    Command> REFRESH CACHE GROUP cacheadm.coun_awt commit every 1 rows;
    *805: Refresh global cache groups has not been implemented*
    The command failed.


    expected result: there is one updated result in Oracle which is supposed to be here in TT.

    Any idea,
    Vikas
  • 31. Re: TimesTen Caching Newbie
    Tim Vincent Explorer
    Currently Being Moderated
    You cannot use REFRESH on a GLOBAL cache group. Create a local cache group if you want to test this functionality. ie drop the GLOBAL attribute when you create it.

    For the LOAD does that row already exists in TT? If so then nothing will be loaded.

    LOAD CACHE GROUP only loads committed inserts on the cached Oracle tables into the TimesTen cache tables. New cache instances are loaded into the cache tables, but cache instances that already exist in the cache tables are not updated or deleted even if the corresponding rows in the cached Oracle tables have been updated or deleted. A load operation is primarily used to initially populate a cache group.

    REFRESH CACHE GROUP replaces cache instances in the TimesTen cache tables with the most current data from the cached Oracle tables including cache instances that are already exist in the cache tables. A refresh operation is primarily used to update the contents of a cache group with committed updates on the cached Oracle tables after the cache group has been initially populated.

    Tim
  • 32. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    Thanks Tim,


    in nutshell it will be like:

    Load will load cache group with newly inserted rows, it will not delete/ update existing rows.
    refresh will refresh cache group with already existing rows be it update/ delete, but it will not insert new row(s).

    One more thing one alternative for my problem (not able to see Oracle changes in TT) :)

    UNLOAD cache group, then again load this time it will be having new data but,
    my concern is: is this the feasible solution for my problem ????


    TIA,
    Vikas
  • 33. Re: TimesTen Caching Newbie
    Tim Vincent Explorer
    Currently Being Moderated
    Yes it's feasible but it depends on how often you are going to do it and how much data you are going to be shipping :) The best way to find out is to test it.

    Tim
  • 34. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    Hi Tim,


    To solve my problem (reflection from TT to Oracle) i tried creating 'usermanaged' group

    Cache Group CACHEADM.JOBS_UM:

    Cache Group Type: User Managed
    Autorefresh: Yes
    Autorefresh Mode: Incremental
    Autorefresh State: On
    Autorefresh Interval: 5 Seconds
    Autorefresh Status: ok
    Aging: No aging defined

    Root Table: TESTUSER.JOBS
    Table Type: Propagate

    but again updating TT is giving following error:

    Command> update jobs t set t.min_salary = 4500 where t.job_id = 'PR_REP';
    *5213: Bad Oracle login error in OCISessionBegin(): ORA-01017: invalid username/*
    password; logon denied rc = -1
    *5131: Cannot connect to backend database: OracleNetServiceName = "timestendb",*
    uid = "TESTUSER", pwd is hidden, TNS_ADMIN = "D:\CachingTT\TTinstallDir\network"
    *, ORACLE_HOME= ""*
    The command failed.

    but Changes in Oracle are getting 'refreshed' to TT


    can u suggest some solution for this???

    Thanks,
    Vikas
  • 35. Re: TimesTen Caching Newbie
    Tim Vincent Explorer
    Currently Being Moderated
    Hi Vikas,

    Have you followed the steps described here to setup the appropriate cache users?
    http://download.oracle.com/docs/cd/E13085_01/doc/timesten.1121/e13073/prereqs.htm#insertedID3

    If so try connecting to TT as your cache manager user (substitute your passwords):

    ttIsql "DSN=your_dsn;UID=cacheadm;PWD=+password+;OraclePWD=+oracle_password+"
    Command> update TESTUSER.jobs t set t.min_salary = 4500 where t.job_id = 'PR_REP';

    If still a problem follow the troubleshooting tip here:
    http://download.oracle.com/docs/cd/E13085_01/doc/timesten.1121/e13073/prereqs.htm#insertedID5

    HTH

    Tim
  • 36. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    Thanks a ton Tim its working now,

    but my question is if we entered with cacheadm, then why testuser.jobs ???
  • 37. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    Thanks a ton Tim its working now,

    but my question is if we entered with cacheadm, then why testuser.jobs ???

    Thanks again,
    Vikas
  • 38. Re: TimesTen Caching Newbie
    Tim Vincent Explorer
    Currently Being Moderated
    If we didn't it would be looking for table cacheadm.jobs which I imagine doesn't exist. It takes the user you connect as as the default schema name.

    Tim
  • 39. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    ok i got it,

    Thanks Tim :)
  • 40. Re: TimesTen Caching Newbie
    ChrisJenkins Guru
    Currently Being Moderated
    The best solution here is to connect to TimesTen properly as follows:

    "DSN=your_dsn;UID=testuser;PWD=timesten_password_for_testuser;OraclePWD=oracle_password_for_testuser"

    that way you are connecting to both TimesTen and oraclw with the correct credentials.

    Note that AUTOREFRESH operations from oracle to TT are executed as the 'cacheadm' user in both Oracle and TT. Propagation of updates via SWT or PROPAGATE are executed in Oracle as the same user as the one you use to connect to TimesTen (UID/PWD) but when we connect to Oracle to do these operations we connect as (UID/OraclePWD) so tjhat combination must be (a) correct for Oracle and (b) the user on Oracle must not be locked etc.

    Chris
  • 41. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    There are many queries asked in this thread like timesten examples, how to use client with timesten, timesten and Oracle version required, some issues with read only and AWT configuration solution for that, as well as alternative using USERMANAGED etc.

    Hope this will provide some help to newbies like me,
    Vikas
  • 42. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    Hi,

    I have user group with following:

    Cache Group CACHEADM.JOBS_UM:

    Cache Group Type: User Managed
    Autorefresh: Yes
    Autorefresh Mode: Incremental
    Autorefresh State: On
    Autorefresh Interval: 5 Seconds
    Autorefresh Status: ok
    Aging: No aging defined

    Root Table: TESTUSER.JOBS
    Table Type: Propagate

    i tried updating JOBS
    con1: Command> update JOBS set MIN_SALARY=5500 where JOB_ID='PR_REP';
    *1 row updated.*

    now able to see this change in TT but its not propogated to Oracle
    can u suggest the solution or problem in this??

    TIA,
    Vikas
  • 43. Re: TimesTen Caching Newbie
    ChrisJenkins Guru
    Currently Being Moderated
    Hi Vikas,

    What is the autocommit mode? If it is zero (disabled) then you need to commit in TimesTen; changes are only ptopagated to Oracle at commit time.

    If you have autocommit enabled then the change must have made it to Oracle since if it did not you would have received an error on your ttIsql session...

    With PROPAGATE, changes made in a transaction are not propagated to Oracle until you commit. Commits are synchronous between TmesTen and Oracle and any oracle errors encountered when applying the changes to oracle or when comitting are immediately reported by TimesTen.

    Please check again with respect to these points.

    Thanks,

    Chris
  • 44. Re: TimesTen Caching Newbie
    780991 Newbie
    Currently Being Moderated
    Thanks Chris,

    Aoutocommit was 0 (OFF)

    changed it to 1 using command> AUTOCOMMIT 1;

    or other by commiting command> commit propagation;


    Appreciate your quick and exact response :)

    Regards,
    Vikas

Legend

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