Synchronous Writethrough Cache Group in 11.2.1.6.1

Hello,
I have created the following SWT cachegroup -
Cache Group CACHEADM.ENT_GRP_SWT_CG:
  Cache Group Type: Synchronous Writethrough
  Autorefresh: No
  Aging: No aging defined
  Root Table: TRAQDBA.ENT_GRP
  Table Type: Propagatebased on this DDL
create synchronous writethrough cache group CACHEADM.ENT_GRP_SWT_CG
from
    TRAQDBA.ENT_GRP (
            GRP_REPRESENTATIVE     NUMBER(12) NOT NULL DEFAULT 0,
            GRP_PARENT_KEY         NUMBER(12) NOT NULL,
            GRP_MEMBER_KEY         NUMBER(12) NOT NULL,
            EVIDENCE_KEY           NUMBER,
            NAME_SCORE             NUMBER(3) NOT NULL,
            ADDRESS_SCORE          NUMBER(3),
            DATE_TIME              TIMESTAMP(6),
            ALERT_ID               NUMBER,
            OLD_GRP_REPRESENTATIVE NUMBER(12),
        primary key (GRP_MEMBER_KEY));When I attempt to insert a row into the cachegroup via ttisql I get the following error -
Command> insert into ent_grp values (1,1,1,null,100,null,sysdate,null,null);
5213: Bad Oracle login error in OCISessionBegin(): ORA-01017: invalid username/password; logon denied rc = -1
5131: Cannot connect to backend database: OracleNetServiceName = "TRAQQA.world", uid = "TRAQDBA", pwd is hidden, TNS_ADMIN = "/app1/oracle/network", ORACLE_HOME= "/opt/oracle-local/home/oracle"
The command failed.When connecting to ttisql I supplied the timesten table owner userid and password. I know that if I supply the oracle password at connect time that the insert will work.
I have AWT cachegroups defined, for example -
Cache Group CACHEADM.EXCLUDED_GRP_ENTITY_AWT_CG:
  Cache Group Type: Asynchronous Writethrough
  Autorefresh: No
  Aging: No aging defined
  Root Table: TRAQDBA.EXCLUDED_GRP_ENTITY
  Table Type: Propagateand I can insert into these cachegroups without the need to supply the oracle password. For example -
Command> autocommit 0
Command> insert into EXCLUDED_GRP_ENTITY values (1,'1',1,1,1,sysdate,1);
1 row inserted.If this behaviour correct? Do I need to supply the oracle password for SWT cachegroups and not AWT cachegroups?
Thanks in advance.
Mark

Hi Chris,
Thanks very much for the information. One other thing we have noticed with the SWT cachegroups that you may be able to comment on - we are using stored procedures in the cache as API's on each of our tables. The stored procedures are owned by the same schema that owns the tables underneath the cache groups. We have an application user that has execute permission on the stored procedures and our java application connects to the application user to execute the stored procedures. We have found when, for example, we insert into the SWT cachegroup via the stored procedures a connection is made to the Oracle server using the userid that owns the stored procedure, not the userid that we have connected to TimesTen with. In our case the connection fails as we are supplying the application users oracle password in OraclePWD and not the schema owners password. Is this the expected behaviour when using stored procedures?
Regards
Mark
Edited by: user557876 on Apr 7, 2011 10:21 PM

Similar Messages

  • Synchronous writethrough and  Asynchronous writethrough cache group

    Hi!
    My question is that can we use Passthrough feature in sychronous or asynchronous writethrough.
    and of which level passthrough=0,1,2,3
    please help........
    regards
    USman

    Yes, PassThrough can be used with AWT and SWT cache groups. Any value is allowed but the only values that make sense are 0, 1 and 3. For AWT and SWT, PassThrough=2 is the same as PassThrough=1.
    Chris

  • ASYNCHRONOUS WRITETHROUGH cache groups

    Hi,
    What service in TimesTen controls AWT to Oracle?.
    Do we need to start any services to enable AWT to oracle?.
    If oracle connection is readily available to TimesTen will the data update to oracle immediately or will Timesten wait for something to be triggered?
    TIA...
    Regards,
    Praksh T

    The AWT push to oracle is handled by the TimesTen replication agent. So, you have to be sure that the repagent is running for the datastore:
    ttAdmin -repstart DSNname
    or connect to the datastore via ttIsql and then
    'call ttRepStart;'
    AWT push, like TimesTen to TimesTen replication, is continuous transactional replication. If there is data queued, then it will be sent 'as fast as possible'. The limiting factor is often the rate at which Oracle can absorb the incoming data.
    Chris

  • About cache group

    一个程序向TimesTen的数据表中插入数据能正常运行。但这个表和ORACLE做Cache Group时就不行。
    I have a wired problem: a program can insers data into a table of TimesTen when there is no Cache Group with oracle.
    However, it can not do this while it is connected to oracle using cache group. Any idea why this happens?
    error message:
    *** ERROR in tt_main.c, line 90:
    *** [TimesTen][TimesTen 7.0.3.0.0 ODBC Driver][TimesTen]TT5102: Cannot load backend library 'libclntsh.so' for Cache Connect.
    OS error message 'ld.so.1: test_C: ???: libclntsh.so: ????: ???????'. -- file "bdbOciFuncs.c", lineno 257,
    procedure "loadSharedLibrary()"
    *** ODBC Error/Warning = S1000, Additional Error/Warning = 5102

    I think I can exculde the above possibilities, as I have checked all the settings above.
    We could use SQL statements as input, and inserting and query can be done at both ends.
    It is only the program that does not work. My "connection string" is the following:
    connstr=====DSN=UTEL7;UID=utel7;PWD=utel7;AutoCreate=0;OverWrite=0;Authenticate=1
    Maybe it is a mistaken properity, or permission, or a switch parameter? Please give some suggestions.
    Thank you very much.
    Create cache group command is:
    Create Asynchronous Writethrough Cache Group utel7_load
    From
    utel7.load(col0 binary_float, col1 binary_float ......
    My odbc.ini is the following:
    # Copyright (C) 1999, 2007, Oracle. All rights reserved.
    # The following are the default values for connection attributes.
    # In the Data Sources defined below, if the attribute is not explicitly
    # set in its entry, TimesTen 7.0 uses the defaults as
    # specified below. For more information on these connection attributes,
    # see the accompanying documentation.
    # Lines in this file beginning with # or ; are treated as comments.
    # In attribute=_value_ lines, the value consists of everything
    # after the = to the end of the line, with leading and trailing white
    # space removed.
    # Authenticate=1 (client/server only)
    # AutoCreate=1
    # CkptFrequency (if Logging == 1 then 600 else 0)
    # CkptLogVolume=0
    # CkptRate=0 (0 = rate not limited)
    # ConnectionCharacterSet (if DatabaseCharacterSet == TIMESTEN8
    # then TIMESTEN8 else US7ASCII)
    # ConnectionName (process argv[0])
    # Connections=64
    # DatabaseCharacterSet (no default)
    # Diagnostics=1
    # DurableCommits=0
    # ForceConnect=0
    # GroupRestrict (none by default)
    # Isolation=1 (1 = read-committed)
    # LockLevel=0 (0 = row-level locking)
    # LockWait=10 (seconds)
    # Logging=1 (1 = write log to disk)
    # LogAutoTruncate=1
    # LogBuffSize=65536 (measured in KB)
    # LogDir (same as checkpoint directory by default)
    # LogFileSize=64 (measured in MB)
    # LogFlushMethod=0
    # LogPurge=1
    # MatchLogOpts=0
    # MemoryLock=0 (HP-UX, Linux, and Solaris platforms only)
    # NLS_LENGTH_SEMANTICS=BYTE
    # NLS_NCHAR_CONV_EXCP=0
    # NLS_SORT=BINARY
    # OverWrite=0
    # PermSize=2 (measured in MB; default is 2 on 32-bit, 4 on 64-bit)
    # PermWarnThreshold=90
    # Preallocate=0
    # PrivateCommands=0
    # PWD (no default)
    # PWDCrypt (no default)
    # RecoveryThreads=1
    # SQLQueryTimeout=0 (seconds)
    # Temporary=0 (data store is permanent by default)
    # TempSize (measured in MB; default is derived from PermSize,
    # but is always at least 6MB)
    # TempWarnThreshold=90
    # TypeMode=0 (0 = Oracle types)
    # UID (operating system user ID)
    # WaitForConnect=1
    # Oracle Loading Attributes
    # OracleID (no default)
    # OraclePWD (no default)
    # PassThrough=0 (0 = SQL not passed through to Oracle)
    # RACCallback=1
    # TransparentLoad=0 (0 = do not load data)
    # Client Connection Attributes
    # ConnectionCharacterSet (if DatabaseCharacterSet == TIMESTEN8
    # then TIMESTEN8 else US7ASCII)
    # ConnectionName (process argv[0])
    # PWD (no default)
    # PWDCrypt (no default)
    # TTC_Server (no default)
    # TTC_Server_DSN (no default)
    # TTC_Timeout=60
    # UID (operating system user ID)
    [ODBC Data Sources]
    TT_tt70=TimesTen 7.0 Driver
    TpcbData_tt70=TimesTen 7.0 Driver
    TptbmDataRepSrc_tt70=TimesTen 7.0 Driver
    TptbmDataRepDst_tt70=TimesTen 7.0 Driver
    TptbmData_tt70=TimesTen 7.0 Driver
    BulkInsData_tt70=TimesTen 7.0 Driver
    WiscData_tt70=TimesTen 7.0 Driver
    RunData_tt70=TimesTen 7.0 Driver
    CacheData_tt70=TimesTen 7.0 Driver
    Utel7=TimesTen 7.0 Driver
    TpcbDataCS_tt70=TimesTen 7.0 Client Driver
    TptbmDataCS_tt70=TimesTen 7.0 Client Driver
    BulkInsDataCS_tt70=TimesTen 7.0 Client Driver
    WiscDataCS_tt70=TimesTen 7.0 Client Driver
    RunDataCS_tt70=TimesTen 7.0 Client Driver
    # Instance-Specific System Data Store
    # A predefined instance-specific data store reserved for system use.
    # It provides a well-known data store for use when a connection
    # is required to execute commands.
    [TT_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/TT_tt70
    DatabaseCharacterSet=US7ASCII
    # Data source for TPCB
    # This data store is created on connect; if it doesn't already exist.
    # (AutoCreate=1 and Overwrite=0). For performance reasons, database-
    # level locking is used. However, logging is turned on. The initial
    # size is set to 16MB.
    [TpcbData_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/TpcbData
    DatabaseCharacterSet=US7ASCII
    PermSize=16
    WaitForConnect=0
    Authenticate=0
    # Data source for TPTBM demo
    # This data store is created everytime the benchmark is run.
    # Overwrite should always be 0 for this benchmark. All other
    # attributes may be varied and performance under those conditions
    # evaluated. The initial size is set to 20MB and durable commits are
    # turned off.
    [TptbmData_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/TptbmData
    DatabaseCharacterSet=US7ASCII
    PermSize=20
    Overwrite=0
    Authenticate=0
    # Source data source for TPTBM demo in replication mode
    # This data store is created everytime the replication benchmark demo
    # is run. This datastore is set up for the source data store.
    [TptbmDataRepSrc_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/TptbmDataRepSrc_tt70
    DatabaseCharacterSet=US7ASCII
    PermSize=20
    Overwrite=0
    Authenticate=0
    # Destination data source for TPTBM demo in replication mode
    # This data store is created everytime the replication benchmark demo
    # is run. This datastore is set up for the destination data store.
    [TptbmDataRepDst_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/TptbmDataRepDst_tt70
    DatabaseCharacterSet=US7ASCII
    PermSize=20
    Overwrite=0
    Authenticate=0
    # Data source for BULKINSERT demo
    # This data store is created on connect; if it doesn't already exist
    # (AutoCreate=1 and Overwrite=0).
    [BulkInsData_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/BulkInsData
    DatabaseCharacterSet=US7ASCII
    LockLevel=1
    PermSize=32
    WaitForConnect=0
    Authenticate=0
    # Data source for WISCBM demo
    # This data store is created on connect if it doesn't already exist
    # (AutoCreate=1 and Overwrite=0). For performance reasons,
    # database-level locking is used. However, logging is turned on.
    [WiscData_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/WiscData
    DatabaseCharacterSet=US7ASCII
    LockLevel=1
    PermSize=16
    WaitForConnect=0
    Authenticate=0
    # Default Data source for TTISQL demo and utility
    # Use default options.
    [RunData_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/RunData
    DatabaseCharacterSet=US7ASCII
    Authenticate=0
    # Sample Data source for the xlaSimple demo
    # see manual for discussion of this demo
    [Sample_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/Sample
    DatabaseCharacterSet=US7ASCII
    TempSize=16
    PermSize=16
    Authenticate=0
    # Sample data source using OracleId.
    [CacheData_tt70]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/info/DemoDataStore/CacheData
    DatabaseCharacterSet=US7ASCII
    OracleId=MyData
    PermSize=16
    # New data source definitions can be added below. Here is my datastore!!!
    [Utel7]
    Driver=/oracle/timesten/TimesTen/tt70/lib/libtten.so
    DataStore=/oracle/timesten/TimesTen/tt70/tt70_data/utel7
    DatabaseCharacterSet=ZHS16GBK
    Uid=utel7
    Authenticate=0
    OracleID=db3
    OraclePWD=utel7
    PermSize=6000
    Connections=20
    #permsize*20%
    TempSize=400
    CkptFrequency=600
    CkptLogVolume=256
    LogBuffSize=256000
    LogFileSize=256

  • Which kind of cache group is suitable for the intensive insertion operation

    Hi Chris,sorry for call you directly. Because you give me many good answers about my many newbile questions these days:)
    You told me that the dynamic cache group is not suitable for the intensive insertion operation
    because each INSERT to a child table has to perform an existence check against Oracle even if load the cache group into RAM manually(Please correct me if wrong).
    Here I have many log tables that they only have a primary key and no foreign references and they are basically used to reflect changes from the related main tables.
    Every insert/update/delete on the main table will insert a log record in the related logging table(No direct foreign references).
    In order to cache these log tables, I have to create a independent cache group for each one, right?
    I do not want load these logs data into RAM because my application do not use them or these logs will waste my RAM clearly.
    so here comes my question.Which kind of cache group should I use to gain the best performance with no loading them into RAM?
    As my understand,the dynamic cache group load data on demand while the regular cache group need load all the data into RAM firstly and it won't load data from oracle anymore?
    Thanks in advance
    SuoNayi

    Let me be more specific. Consider this cache group:
    CREATE DYNAMIC ASYNCHRONOUS WRITETHROUGH CACHE GROUP CG_SWT
    FROM
    TPARENT
    PPK NUMBER(8,0) NOT NULL PRIMARY KEY,
    PCOL1 VARCHAR2(100)
    TCHILD
    CPK NUMBER(6,0) NOT NULL PRIMARY KEY,
    CFK NUMBER(8,0) NOT NULL,
    CCOL1 VARCHAR2(20),
    FOREIGN KEY ( CFK ) REFERENCES TPARENT ( PPK )
    INSERTS into TPARENT will not do any existence check in Oracle. An INSERT INTO TCHILD has to verify that the corresponding parent row exists. If the parent row exists in TimesTen then no check is doen in Oracle. If the parent row does not exist in TimesTen then we have to check if it exists in Oracle and if it does we will load it into TimesTen from Oracle (along with any other child rows) before completing the INSERT in TimesTen. So in the case where the parent always exists already in TimesTen there is no overhead but on the other case there is a lot of overhead.
    If your log table is truly not related to the main table (not in TT and not in Oracle either) then they should go into separate cache groups. If each insert into the log table has a unique key and there is no possibility of duplicates then you do not need to load anything into RAM. You can start with an empty table and just insert into it (since each insert is unique). Of course, if you just keep inserting you will eventually fuill up the memory in TimesTen. So, you need a mechanism to 'purge' no longer needed rows from TimesTen (they will still exist in Oracle of course). There are really two options; investigate TimesTen auotmatic aging (see documentation) - thsi may be adeuate of the insert rate is not too high - or implement a custom purge mechanism using UNLOAD CACHE GROUP (see documentation).
    Chris

  • Bidirectional replication of cache groups to cache

    We setup a Bidirectional replication of AWT cache groups to AWT cache groups.
    ================================================
    create asynchronous writethrough cache group T1_CACHE from T1
         a NUMBER(12) NOT NULL,
         b NUMBER(12),
         c NUMBER(12),
         PRIMARY KEY (a)
    CREATE REPLICATION rep.mytt
    ELEMENT a DATASTORE
    MASTER mydata ON "ser1"
    SUBSCRIBER mydata ON "ser2" RETURN TWOSAFE
    ELEMENT b DATASTORE
    MASTER mydata ON "cx_pdscp2"
    SUBSCRIBER mydata ON "cx_pdscp1" RETURN TWOSAFE;
    ========================================================
    I write a application.It forks 30 child process and insert values into t1.The replication between the master and subscriber is ok, but the replication agent of master to Oracle can not work well. After 3~5 minutes, it print the log:
    ========================================================
    19:15:15.13 Err : REP: 6359: MYDATA:receiver.c(5668): TT16038: Failed to begin transaction for caller: rxBegin
    Tx()
    19:15:15.13 Err : REP: 6359: MYDATA:receiver.c(5668): TT864: TT0864: Operation prohibited with an active trans
    action -- file "dbAPI.c", lineno 3822, procedure "sb_xactBeginQ()"
    19:15:15.13 Err : REP: 6359: MYDATA:receiver.c(5002): TT16187: Transaction 1187176202/995; Error: transient 1,
    permanent 0
    =======================================================
    Pls help me! Thanks!

    Hi,
    This configuration is not supported; you can configure a bi-directional 2-safe scheme without AWT (as long as you only use it in a logical active/standby fashion).
    If you want to achieve high availability using 2-safe replication and AWT then you must use the explicit ACTIVE STANDBY pair replication (you will need TimesTen 7.0 to do this). This fully supports the combination of 2-safe replication and AWT.
    Regards, Chris

  • How to query data from grid cache group after created global AWT group

    It is me again.
    as I mentioned in my previous posts, I am in progress of setup IMDB grid environment, and now I am at stage of creating cache group. and I created global AWT cache group on one node(cachealone2), but I can not query this global cache group from another node(cachealone1)
    thanks Chirs and J, I have done successfully setup IMDB grid env, and have two node in this grid as below
    Command> call ttGridNodeStatus;
    < MYGRID, 1, 1, T, igs_imdb02, MYGRID_cachealone1_1, 10.214.10.176, 5001, <NULL>, <NULL>, <NULL>, <NULL>, <NULL> >
    < MYGRID, 2, 1, T, igsimdb01, MYGRID_cachealone2_2, 10.214.10.119, 5002, <NULL>, <NULL>, <NULL>, <NULL>, <NULL> >
    2 rows found.
    and I create group ATW cache group on cachealone2
    Command> cachegroups;
    Cache Group CACHEUSER.SUBSCRIBER_ACCOUNTS:
    Cache Group Type: Asynchronous Writethrough global (Dynamic)
    Autorefresh: No
    Aging: LRU on
    Root Table: ORATT.SUBSCRIBER
    Table Type: Propagate
    1 cache group found.
    Command> SELECT * FROM oratt.subscriber;
    0 rows found.
    however I can not query this from another node cachealone1
    Command> SELECT * FROM oratt.subscriber WHERE subscriberid = 1004;
    2206: Table ORATT.SUBSCRIBER not found
    The command failed.
    Command> SELECT * FROM oratt.subscriber WHERE subscriberid = 1004;
    2206: Table ORATT.SUBSCRIBER not found
    The command failed.
    Command> SELECT * FROM oratt.subscriber;
    2206: Table ORATT.SUBSCRIBER not found
    this is example from Oracle docs, I an not sure where I missed for this. thanks for your help.

    Sounds like you have not created the Global AWT cache groupo in the second datastore? There is a multi-step process needed to roll out a cache grid and various things must be done on each node in the correct order. have you done that?
    Try checking out the QuickStart example here:
    http://download.oracle.com/otn_hosted_doc/timesten/1121/quickstart/index.html
    Chris

  • Error in creating Cache Group

    Hi,
    When i tried to create cache group i am getting below error
    CREATE READONLY CACHE GROUP customer_orders
    FROM myuser.customer
    (cust_num NUMBER(6) NOT NULL,
    region VARCHAR2(10),
    name VARCHAR2(50),
    address VARCHAR2(100),
    PRIMARY KEY(cust_num)),
    myuser.orders
    (ord_num NUMBER(10) NOT NULL,
    cust_num NUMBER(6) NOT NULL,
    when_placed DATE NOT NULL,
    when_shipped DATE NOT NULL,
    PRIMARY KEY(ord_num),
    FOREIGN KEY(cust_num) REFERENCES myuser.customer(cust_num)) ;
    5220: Permanent Oracle connection failure error in OCIServerAttach(): ORA-12154: TNS:could not resolve the connect identifier specified rc = -1
    5131: Cannot connect to backend database: OracleNetServiceName = "orcl_db", uid = "XXXXXXX", pwd is hidden, TNS_ADMIN = "C:\TimesTen11.2.2", ORACLE_HOME= ""
    But my Oracle database Name is MYdatabase
    Oracle LSNRCTL
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1522)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
    Start Date 07-AUG-2012 10:31:38
    Uptime 4 days 3 hr. 1 min. 55 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\TimesTen11.2.2\listener.ora
    Listener Log File E:\app\XXXXXXX\diag\tnslsnr\localhost\listener\alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1522ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1522)))
    Services Summary...
    Service "MYdatabaseXDB" has 1 instance(s).
    Instance "MYdatabase", status READY, has 1 handler(s) for this service...
    Service "MYdatabase" has 1 instance(s).
    Instance "MYdatabase", status READY, has 1 handler(s) for this service...
    Service "orcl" has 1 instance(s).
    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    how to change OracleNetServiceName = "orcl_db" to OracleNetServiceName = "MYdatabase"
    Thanks!

    You should create the cache groups by using cachadmin user, not use object owner user.
    In Oracle DB:
    SQL> @grantCacheAdminPrivileges "cacheadmin"
    Please enter the administrator user id
    The value chosen for administrator user id is cacheadmin
    ***************** Initialization for cache admin begins ******************
    0. Granting the CREATE SESSION privilege to CACHEADMIN
    1. Granting the TT_CACHE_ADMIN_ROLE to CACHEADMIN
    2. Granting the DBMS_LOCK package privilege to CACHEADMIN
    3. Granting the RESOURCE  privilege to CACHEADMIN
    4. Granting the CREATE PROCEDURE  privilege to CACHEADMIN
    5. Granting the CREATE ANY TRIGGER  privilege to CACHEADMIN
    6. Granting the DBMS_LOB package privilege to CACHEADMIN
    7. Granting the SELECT on SYS.ALL_OBJECTS privilege to CACHEADMIN
    8. Granting the SELECT on SYS.ALL_SYNONYMS privilege to CACHEADMIN
    9. Checking if the cache administrator user has permissions on the default
    tablespace
         Permission exists
    11. Granting the CREATE ANY TYPE privilege to CACHEADMIN
    ********* Initialization for cache admin user done successfully *********
    SQL>In TimesTen:
    Command> CREATE USER cacheadmin IDENTIFIED BY oracle;
    User created.
    Command> GRANT CREATE SESSION, CACHE_MANAGER, CREATE ANY TABLE, DROP ANY TABLE TO cacheadmin;
    Command>
    Command> CREATE USER oratt IDENTIFIED BY oracle;
    User created.
    Command> grant create session to oratt;
    Command>
    [oracle@tt1 ~]$ ttIsql "DSN=db_cache;UID=cacheadmin;PWD=oracle;OraclePWD=oracle"
    Copyright (c) 1996-2010, Oracle.  All rights reserved.
    Type ? or "help" for help, type "exit" to quit ttIsql.
    connect "DSN=db_cache;UID=cacheadmin;PWD=oracle;OraclePWD=oracle";
    Connection successful: DSN=db_cache;UID=cacheadmin;DataStore=/u01/app/oracle/datastore/db_cache;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;DRIVER=/u01/app/oracle/product/11.2.1/TimesTen/tt1/lib/libtten.so;PermSize=100;TempSize=32;TypeMode=0;CacheGridEnable=0;OracleNetServiceName=ORCL;
    (Default setting AutoCommit=1)
    Command> call ttCacheUidPwdSet('cacheadmin','oracle');
    Command>
    Command> CREATE READONLY CACHE GROUP readcache
           >   AUTOREFRESH INTERVAL
           >   5 SECONDS
           > FROM oratt.readtab (
           >        a NUMBER NOT NULL PRIMARY KEY,
           >        b VARCHAR2(100) );
    Command> Additionally dont forget to issue the grants for cacheadmin user in Oracle DB
    SQL> GRANT SELECT ON readtab TO cacheadmin;
    Grant succeeded.Regards,
    Gennady

  • A question about cache group error in TimesTen 7.0.5

    hello, chris:
    we got some errors about cache group :
    2008-09-21 08:56:15.99 Err : ORA: 229574: ora-229574-3085-ogTblGC00405: Failed calling OCI function: OCIStmtFetch()
    2008-09-21 08:56:15.99 Err : ORA: 229574: ora-229574-3085-raUtils00373: Oracle native error code = 1405, msg = ORA-01405: fetched column value is NULL
    2008-09-21 08:56:28.16 Err : ORA: 229576: ora-229576-2057-raStuff09837: Unexpected row count. Expecting 1. Got 0.
    and the exact scene is: our oracle server was restart for some reason, but we didnot restart the cache group agent. then iit start appear those errors informations.
    we want to know, if the oracle server restart, whether we need to restart cache agent?? thank you..

    Yes, the tracking table will track all changes to the associated base table. Only changes that meet the cache group WHERE clause predicate will be refreshed to TimesTen.
    The tracking table is managed automatically by the cache agent. As long as the cache agent is running and AUTOREFRESH is occurring the table will be space managed and old data will be purged.
    It is okay if very occasionally an AUTOREFRESH is unable to complete within its defined interval but if this happens with any regularity then this is a problem since this situation is unsustainable. To remedy this you need to try one or more of:
    1. Tune execution of AUTOREFRESH queries in Oracle. This may mean adding additional indexes to some of the cached Oracle tables. There is an article on this in MetaLink (doc note 473493.1).
    2. Increase the AUTOREFRESH interval so that a refresh can always complete within the defined interval.
    In any event it is important that you have enough space to cope with the 'steady state' size of the tracking table. If the cache agent will not be running for any significant length of time you need to manually cleanup the tracking table. In TimesTen 11g a script to do this is provided but it is not officially supported in TimesTen 7.0.
    If the rate of updates on the base table is such that you cannot arrive at a sustainable situation by tuning etc. then you will need to consider more radical options such as breaking the table into multiple separate tables :-(
    Chris

  • Problem creating cache group for a table with data type varchar2(1800 CHAR)

    Hi,
    I am using TimesTen 7.0 with Oracle 10.2.0.4 server. While creating Cache Group for one of my table I'm getting the following error.
    5121: Non-standard type mapping for column TICKET.DESCRIPTION, cache operations are restricted
    5168: Restricted cache groups are deprecated
    5126: A system managed cache group cannot contain non-standard column type mapping
    The command failed.
    One of my filed type in oracle table is Varchar2(1800 CHAR). If I change the filed size to <=1000 it (E.g. Varchar2(1000 CHAR)) then the Create Cache command works fine.
    MyDatabase Character Set is UTF8.
    Is it possible to solve without changing the filed size in the Oracle Table?
    Request your help on this.
    Thanks,
    Sunil

    Hi Chris.
    The TimesTen server and the Oracle Client is installed on a 32-bit system.
    1. ttVersion
    TimesTen Release 7.0.5.0.0 (32 bit Linux/x86) (timesten122:17000) 2008-04-04T00:09:04Z
    Instance admin: root
    Instance home directory: /appl/TimesTen/timesten122
    Daemon home directory: /var/TimesTen/timesten122
    Access control enabled.
    2. Oracle DB details
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for Linux: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Oracle Client - Oracle Client 10.2.0.4 running in a 32 bit Linux/x86
    3. ODBC Details
    Driver=/appl/TimesTen/timesten122/lib/libtten.so
    DataStore=/var/TimesTen/data
    PermSize=1700
    TempSize=244
    PassThrough=2
    UID=testuser
    OracleId=oraclenetservice
    OraclePwd=testpwd
    DatabaseCharacterSet=UTF8
    Thanks,
    Sunil

  • How Insert Work on global cache group?

    Hi all , i'm doing some test about how many transactions for second TimesTen can process.
    With a normal configuration "direct" i reached 5200 transaction for second, on my machine (OS windows normal work station).
    now i'm using the global cache groups because we need more then one DataSource , and they have to be syncro, one with each other.
    And how i read in the guide the global cache group are perfect for this purpose.
    After configured the 2 environment with different DataBase TimesTen (those machine are server SUN, much better of my work station :P), i tried a simple test
    of insert on a single node.
    But i reached only 1500 as maximum value of transactions for second.
    The 5200 value when testing on my work station was with normal Dynamic Cache Group, not Global. So i was thinking if this performance issue was related on how the Insert statement work on a global cache group.
    Some questions:
    1) before the insert is done on Oracle, the Cache Group do some query on the other cache global group to avoid some conflicts on primary key?
    2) there is any operation performed from global cache to others when a statement is sendend?
    The 2 global cache anyway are working well, locking and changing owner on a instance cache so no problems detected atm are about " how they have to work":).
    The problem is only that we need that the global cache do it more and more faster :P at last the 5200 transaction for second i reached on my work station.
    Thanks in advance for any suggestion.
    P.S.:I don't know much about the server configuraion (SO solaris some version) but anyway good machines :).

    Okay, the rows here are quite large so you need to do some tuning. In the ODBC (DSN) parameters I see that you are using the default log buffer abd log file sizes. these are totally inadequate for this kind of workload. You should increase both to a larger value. For this kind of workloads typial values would be in the range of 256 MB to 1024 MB for both log buffer and log file size. If you are using 32-bit TimesTen you may be constrained on how large you can make these sicne the log buffer is part of the overall datastore memory allocation wh9ich on 32-bit platforms is quite limited. On 64-bit TimesTen you have no such restriction (as long as the machine has enough memory). Here is an example of the directives you would use to set both to 1 GB. The key one is the log buffer size but it is important that LogFileSize is >= LogBufMB.
    [my_ds]
    LogBufMB=1024
    LogFileSize=1024
    For this change to take effect you need to shutdown (unload from memory) and restart (load back into memory) the datastore.
    Secondly, it's hard to be sure from your example code but it looks like maybe you are pre-paring the INSERT each time you execute it? If that is the case this is very expensive and unnecessary. You only need to prepare once and then you can execute many times as follows:
    insPs = connection.prepareStatement("Insert into test.transactions (ID_ ,NUMBE,SHORT_CODE,REQUEST_TIME) Values (?,?,?,?)");
    for (int i=1; i < 1000000; i++)
    insPs.setString(1,""+getSequence());
    insPs.setString(2,"TEST_CODE");
    insPs.setString(3,"TT Insert test");
    insPs.setTimestamp(4, new Timestamp(System.currentTimeMillis()));
    insPs.execute();
    connection.commit();
    This should improve performance noticeably. mif you can get away with only comiting every 'N' inserts you will see a further uplift. For example:
    int COMMIT_INTVL = 100;
    for (int i=1; i < 1000000; i++)
    insPs.setString(1,""+getSequence());
    insPs.setString(2,"TEST_CODE");
    insPs.setString(3,"TT Insert test");
    insPs.setTimestamp(4, new Timestamp(System.currentTimeMillis()));
    insPs.execute();
    if ( (i % COMMIT_INTVL) == 0 )
    connection.commit();
    connection.commit();
    And lastly, the fastest way of all is to use JDBC batch operations; see the JDBC documentation about batch operations. That will improve insert performance still more.
    Lastly, a word of caution. Although you will probably be able to easily achieve more than 5000 inserts per second into TimesTen, TimesTen may not be able to push the data to oracle at this rate. the rate of push to Oracle is likely to be significantly slower. Thus if you are executing a continuous high volume insert workload into TimesTen two things will happen; (a) the datastore will become fiull and unable to accepot any more inserts until you explicitly remove some data and (b) a backlog will build up (in the TT transaction logs on disk) of data waiting to be pushed to Oracle.
    This kind of setup is not really suited to support sustained high insert levels; you need to look at the maximum that can be sustained for the whole application -> TimesTen -> Oracle pathway. Of course, if the workload is 'bursty' then this may not be an issue at all.
    Chris

  • More than one root table ,how to design cache group ?

    hi,
    each cache group have onle one root table , many child table ,if my relational model is :
    A(id number,name ....,primary key id)
    B(id number,.....,primary key id)
    A_B_rel (aid number,bid number,foreign key aid referenc a (id),
    foreign key bid referenc b(id))
    my select statement is "select ... from a,b,a_b_rel where ....",
    i want to cache these three table , how should i create cache group ?
    my design is three awt , Cache group A for A , Cache Group b for b, Cache group ab to a_b_rel ?
    are there other better solution ?

    As you have discovered, you cannot put all three of these tables into one cache group. For READONLY cache groups the solution is simple, put two of the tables (say A and A_B) in one cache group and the other table (B) in a different cache group and make sure that both use the same AUTOREFRESH interval.
    For your case, using AWT cache groups, the situation is a bit mnore complicated. You must cache the tables as two different cache groups as mentioned above, but you cannot define a foreign key relationship in TimesTen between tables in different cache groups. Hence you will need to add logic to your application to check and enforce the 'missing' foreignb key relationship (B + A_B in this example) to ensure that you do not inadvertently insert data that would violate the FK relationship defined in Oracle. Otherwise you could insert invalid data in TimesTen and this would then fail to propagate to Oracle.
    Chris

  • Can an unique index be created on read only cache group

    Hi
    Can an unique index be created on read only cache group
    Regards
    Siva Kumar

    No, I do not think so. Creating a unique index could cause autorefresh operations to fail if the data being refreshed contains duplicate values that would not be allowed by the index. You can create regular indexes on a table in a readonly cache group.
    Chris

  • TimesTen Error :5126: A system managed cache group cannot contain non-stand

    I have created few cache groups in TimesTen.
    And when i fired script to create fillowing cache group its gives me error.
    please see the details mentioned below.
    CREATE USERMANAGED CACHE GROUP C_TBLSSTPACCOUNTINGSUMMARY
    AUTOREFRESH MODE INCREMENTAL INTERVAL 5 SECONDS STATE ON
    FROM
    schema.tablename
    ACCOUNTINGSUMMARYID DOUBLE,
    INPUTFILENAME VARCHAR(255) NOT NULL,
    ACCOUNTINGSTATUS VARCHAR(255) NOT NULL,
    RECORDCOUNT DOUBLE,
    LASTUPDATEDDATE DATE NOT NULL,
    CREATEDATE TIMESTAMP DEFAULT SYSDATE,
    PRIMARY KEY (ACCOUNTINGSUMMARYID),
    PROPAGATE);
    then error occurs like==>
    5121: Non-standard type mapping for column JISPRATCORBILLINGDEV501.TBLSSTPACCOUNTINGSUMMARY.ACCOUNTINGSUMMARYID, cache operations are restricted
    5126: A system managed cache group cannot contain non-standard column type mapping
    The command failed.

    If you have access to Oracle Metalink, Please take a look at the Note:367431.1
    Regards,
    Sabdar Syed.

  • Drop cache group in timesten 11.2.1

    Hello,
    I am trying to drop an asynchronous cache group in timesten. I follow the below steps to do so:
    a) I use the connection string with the DSN, UID, PWD, OracleID, OraclePWD specified
    b) If replication policy is 'always', change it to 'manual'
    c) Stop replication
    d) Drop the AWT cache group (+drop cache group cachegroupname;+)
    e) Create the modified AWT
    f) Start replication
    g) Set replication policy back to 'always'
    After step (d), I get the following error:
    Command> drop cache group cachegroupname;
    +5219: Temporary Oracle connection failure error in OCIServerAttach(): ORA-12541: TNS:no listener rc = -1+
    +5131: Cannot connect to backend database: OracleNetServiceName = "servicename", uid = "inputuid", pwd is hidden, TNS_ADMIN = "/opt/TT/linux/info", ORACLE_HOME= "/opt/TT/linux/ttoracle_home/instantclient_11_1"+
    +5109: Cache Connect general error: BDB connection not open.+
    The command failed.
    Command>
    Does the error suggest that cache connect has a problem? Should I restart the timesten daemon and try again? Please let me know what the real problem is.
    Let me know if you need information.
    Thanks,
    V

    The SQL*Plus problem is simply because you don't have all the correct directories listed in LD_LIBRARY_PATH. It's likely that your .profile (or equivalenbt) was setting those based on ORACLE_HOME and if this is now unset that could be he problem. Check that LD_LIBRARY_PATH is set properly and this problem will go away.
    The character set issues is potentially more problematic. it is mandatory that the Database character set used by TimesTen exactly matches that of Oracle DB when TT is being used as a cache. If the character sets truly are different then this is very serious and you need to rectify it as many things will fail otherwise. You either need to switch Oracle DB back to US7ASCII (this is probably a big job) or you need to change the TT character set to WE8MSWIN1252.
    To accomplish the latter you would:
    1. Take a backup of the TT datastore using ttBackup (just for safety).
    2. For any non-cache tables (i.e. TT only tables), unload data to flat files using ttBulkCp -o ...
    3. Save the schema for the datastore using ttSchema.
    4. Stop cache and replication agents.
    5. Ensure datastore is unloaded from memory and then destroy the datastore (ttDestroy)
    6. Edit sys.odbc.ini to change Datastore character set.
    7. Connect to datastore as instance administrator (to create datastore). Create all necessary users and grant required privileges.
    8. Set the cahce userid/password (call ttCacheUidPwdSSet(...,...))
    9. Start the cache agent.
    10. Run the SQL script generated by ttSchema to re-create all database objects (tables and cache groups etc.)
    11. Re-populate all non-cache tables from the flat files using ttBulkCp -i
    12. Re-load all cache groups using LOAD CACHE GROUP ...
    13. restart replication agent.
    That's pretty much it (hopefully I have not missed out any vital step).
    Chris

Maybe you are looking for

  • I have problems accessing apps installed in my iPad through iTunes 12

    I have several apps installed in my iPad, among them Adobe Reader and AVPlayerHD. With the previous version of iTunes it was easy to access these apps and upload content directly to the apps in order to see this content on the iPad 3rd gen, model MD3

  • How can I click to hande OVS and Search help for Web Dynpro

    Once the F4 help is clicked,  the event OVS of IF_WD_VALUE_HELP_FORWARD is triggered. Here  I would like to change the value list of F4 help list, I implemented a class and a method that handle that event. Since event only has importing parameter, ho

  • Help with scritping

    I really need to include the file name in the footer of each Pages document, preferably automatically (so I don't forget to change the name when I 'save as...'). Pages cannot not do this as it has no equivalent of Word's fields. So I tried to write a

  • Problem in selecting Radiobutton

    hI EXPERTS,   i hv created radiobutton, but bydefault it is only selecting 1 button whose index i hv put in WDDOINITmethod. If i select other radiobutton still it is selecting bydefault radiobutton. how to rectify? Thanks in adv, sanjay

  • Apple Preview- Change DPI

    Is there a way to change the DPI of a photo within Apple Preview? I could also use iPhoto. I'm trying to avoid using Photoshop as it always saves in an Adobe format. Thanks, Alexander