Investigate:
“ttIsql InstanceName”
CREATE USER <USERNAME> IDENTIFIED BY <PASSWORD>; GRANT CREATE SESSION, CREATE TABLE TO <USERNAME> ;
Maybe you also must give that user
Connect as the user:
CONNECT "dsn=<INSTANCENAME>;uid=<USERNAME>";
cd /home/timesten/TimesTen/tt1122/info
sys.odbc.ini
[ODBC Data Sources] test-ttdb=TimesTen 11.2.2 Driver
##################################################################### # # New data source definitions can be added below. # ##################################################################### [test-ttdb] Driver=/home/timesten/TimesTen/tt1122/lib/libtten.so DataStore=/home/ttdata/datastores/test-ttdb LogDir=/home/ttdata/logs PermSize=1024 TempSize=512 DatabaseCharacterSet=AL32UTF8
mkdir -p /home/ttdata/datastores/test-ttdb /home/ttdata/logs
“ttIsql InstanceName”
CREATE USER <USERNAME> IDENTIFIED BY <PASSWORD>; GRANT CREATE SESSION, CREATE TABLE TO <USERNAME> ;
Connect as the user:
CONNECT "dsn=<INSTANCENAME>;uid=<USERNAME>";
1st of all, in the OracleDB run the following scripts as sysdba:
@initCacheGlobalSchema.sql @grantCacheAdminPrivileges.sql
Both are located on the TimesTen installation (oraclescripts folder). This time I use the user named on the TT db creation.
Then create the grid on TimesTen:
call ttGirdCreate('GridName'); call ttGirdNameSet('GridName');
TimesTen side:
call ttGridDetach; call ttrepstop; DROP CACHE GROUP tester.writecache; DROP CACHE GROUP tester.dummy_cli; call ttGridDestroy('ttGrid'); call ttCacheStop;
Oracle Side:
DROP USER cacheadm CASCADE; DROP USER tester CASCADE; DROP USER timesten CASCADE; DROP ROLE tt_cache_admin_role; DROP TABLESPACE cachegrid_tbl INCLUDING CONTENTS AND DATAFILES; DROP TABLESPACE cacheadmtblsp INCLUDING CONTENTS AND DATAFILES;
This assumes you already have a functioning Cache Grid with at least one TT node and one Oracle database.
1. Create the relevant users in the TimesTen datastore to be added to the Cache Grid. The datastore in the examples is called tt1121_2. Connect as the Instance Administrator user. This is assuming the Cache Admin user cacheadm and Oracle user tester are the same users / passwords that you created in previous TT nodes attached to the same grid, and hence do not need to be pre-created on Oracle again.
CREATE USER cacheadm IDENTIFIED BY cacheadmora; CREATE USER tester IDENTIFIED BY tester; GRANT CREATE SESSION, CACHE_MANAGER TO cacheadm; grant create any table to cacheadm; grant drop any table to cacheadm; grant admin to tester; -- as a shortcut make the TT user an administrator -- this isn't recommended anywhere else apart from for testing
2. Run the following as the Cache Administrator on the Timesten datastore tt1121_2. This assumes the tester.writetab table has already been created on Oracle:
call ttCacheUidPwdSet('cacheadm','cacheadmora'); call ttGridNameSet('ttGrid'); call ttCacheStart; CREATE DYNAMIC ASYNCHRONOUS WRITETHROUGH GLOBAL CACHE GROUP tester.writecache FROM tester.writetab (a NUMBER NOT NULL PRIMARY KEY, b VARCHAR2(31)); call ttrepstart; call ttGridAttach(1,'tt1121_2','mymachine',9992);
3. Run the following as Instance Administrator on the Timesten datastore tt1121_2:
GRANT SELECT ON tester.writetab TO cacheadm; GRANT insert ON tester.writetab TO cacheadm; GRANT update ON tester.writetab TO cacheadm; GRANT delete ON tester.writetab TO cacheadm;
From ttisql
dssize;
host ttstatus ;
ALTER CACHE GROUP <GROUPNAME> SET AUTOREFRESH STATE PAUSED;
ALTER CACHE GROUP <GROUPNAME> SET AUTOREFRESH STATE OFF;
ALTER CACHE GROUP <GROUPNAME> SET AUTOREFRESH STATE ON;
REFRESH CACHE GROUP <GROUPNAME> COMMIT EVERY 200 ROWS ;
LOAD CACHE GROUP <GROUPNAME> COMMIT EVERY 200 ROWS ;
UNLOAD CACHE GROUP <GROUPNAME> ;
SELECT CGNAME, CGOWNER FROM SYS.CACHE_GROUP ;
More detailed
cachegroups
SELECT TBLNAME, TBLOWNER FROM SYS.TABLES ;
With cache group:
SELECT T.TBLNAME, T.TBLOWNER, CG.CGNAME FROM SYS.TABLES T, SYS.CACHE_GROUP CG WHERE T.CACHEGROUP=CG.CGID ;
CALL ttCacheStop;
CALL ttCacheStart;
ttmodinstall -tns_admin D:\Oracle\64\product\12.1.0\client_1\network\admin
From official documentation.
ttAdmin -cacheStart "DSN=TIMESTENDSN;UID=AdminUID"
ttAdmin -cacheStop "DSN=TIMESTENDSN;UID=AdminUID"
ttAdmin -ramPolicy always SalesData
ttAdmin -ramPolicy inUse SalesData
ttAdmin -ramPolicy manual SalesData
ttAdmin -ramLoad SalesData
ttAdmin -ramUnload SalesData
Error sample:
PS C:\TimesTen\tt1122_64\bin> .\ttIsql.exe myinstance_tt Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=myinstance_tt"; 15105: User XXXX requesting database creation is not the instance administrator. Please verify user id and password. Only the instance administrator can create a database. The command failed. Done.
The problem is that you're trying to access the instance WITHOUT being super admin (the one who installed the software).
See the admin user with:
PS C:\TimesTen\tt1122_64\bin> .\ttStatus.exe TimesTen status report as of Mon Mar 23 18:42:23 2015 Daemon pid 3248 port 53396 instance tt1122_64 TimesTen server pid 2052 started on port 53397 ------------------------------------------------------------------------ Accessible by group CIBERTERMINAL\Domain Users End of report PS C:\TimesTen\tt1122_64\bin> .\ttVersion.exe TimesTen Release 11.2.2.7.4 (64 bit NT) (tt1122_64:53396) 2014-07-03T22:56:59Z Instance admin: dodger Instance home directory: C:\TimesTen\TT1122~1\ Group owner: CIBERTERMINAL\Domain Users Daemon home directory: C:\TimesTen\TT1122~1\srv\info PL/SQL enabled.
And Connect/create the database with:
PS C:\TimesTen\tt1122_64\bin> .\ttIsql.exe "DSN=MYINSTANCE_TT;UID=dodger" Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=MYINSTANCE_TT;UID=dodger"; Connection successful: DSN=DIVAPRE_TT;UID=dodger;DataStore=C:\TimesTen\MYINSTANCE_TT;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=AL32UTF8;DRIVER=C:\TimesTen\TT1122~1\bin\ttdv1122.dll;Isolation=1;LogDir=C:\TimesTen\MYINSTANCE_TT\txlogs;PermSize=20480;TempSize=5120;PermWarnThreshold=90;TempWarnThreshold=90;PassThrough=2;RecoveryThreads=4;RACCallback=0;TypeMode=0;PLSCOPE_SETTINGS=IDENTIFIERS:NONE;DynamicLoadErrorMode=1;OracleNetServiceName=CIBERTERMINAL;ReplicationParallelismBufferMB=128;RangeIndexType=1; (Default setting AutoCommit=1) Command>
This error is either in sqldeveloper or ttIsql:
No Oracle password found in connection. This command requires a connection with an Oracle password.
The cache admin username MUST BE THE SAME as the oracle user tt admin.
In sqldeveloper you must allow the creation of cache groups and fill the connection settings.
5907: The cache admin user id was not set before performing the operation. Set the cache admin user id and password ei ther through the built-in procedure ttCacheUidPwdSet or the utility ttAdmin and try again. The command failed.
You must set the it all:
ttAdmin -cacheUidPwdSet -cacheUid cache_manager_user -cachePwd ThePassword myDSN
Warning 5002: Unable to connect to the cache agent for c:\timesten\DIVAPRE_TT; check agent status Warning 5051: Commit message to cache agent failed. Cache agent must be restarted
Start (or restart) the cache agent:
ttadmin -cacheStart myDSN ttadmin -cacheStop myDSN
5221: Oracle syntax error in OCIStmtExecute(): ORA-00907: missing right parenthesis rc = -1
While executing ttGridAttach:
ttGridAttach(currentNode, 'name1', IPAddr1, port1)
I found that ALL THE PARAMETERS need to be between single quotation mark!
Whole stack:
11:23:24.10 Err : : 1344: 1670/0x14c6030: cacheGrid.c (10349): Member TT001: sbCGAttach failed at line 10193, errCode=3344 - TT3344: Error creating grid threads: cacheGridAPI.c (759): Member DIVAGRID_TT001_1 got error TT3401: P2P error: Failed to bind to socket
While executing ttGridAttach
The combination ip:port must be FREE! (TT will bind that ip:port combo).
Maybe you've tried early an attachment and the data are logged on the oracle side. You can see that info in a table matching TT_%_CGNODEINFO, search it:
SELECT owner, object_name, object_type FROM dba_objects WHERE object_name LIKE '%CGNODEINFO%' ORDER BY 2;
And delete the data:
SELECT 'DELETE FROM ' || OWNER || '.' || OBJECT_NAME || ' ; ' FROM dba_objects WHERE object_name LIKE '%CGNODEINFO%' ; commit;
(maybe you want to make a backup of the data).
Whole stack:
Command> CREATE DYNAMIC ASYNCHRONOUS WRITETHROUGH GLOBAL CACHE GROUP CACHEDUSER."aaaa" > FROM > "CACHEDUSER"."EMAIL_QUEUE" > ("ID" NUMBER(22,0) NOT NULL, > "XML_PARAMS" VARBINARY(4194304) NOT NULL, > "PROCESSED" NUMBER NOT NULL, > "ERROR_COUNT" NUMBER(22,0) NOT NULL, > "CREATION_TIME" TIMESTAMP (0) NOT NULL, > "LAST_ERROR_MSG" VARCHAR2(4000), > "SENDING_TIME" TIMESTAMP (0) NOT NULL, > "SENT_TIME" TIMESTAMP (0), > "PRIORITY" NUMBER(22,0), > "SENDER_MODULE" NVARCHAR2(280), > "SENDER_EMAIL" VARCHAR2(1024) NOT NULL, > "RECEIVER_EMAIL" VARCHAR2(1024) NOT NULL, > PRIMARY KEY ("ID") > ); 3316: Cache group definition mismatch among the members of the grid
Maybe you've tried early a definition of the cache group, maybe not with the same name but using the same table!! Drop it from Oracle.
You can seek that info in a table matching TT_%CGGROUPDEFS:
SELECT owner, object_name, object_type FROM dba_objects WHERE object_name LIKE '%CGGROUPDEFS%' ORDER BY 2;
And delete the data:
SELECT 'DELETE FROM ' || OWNER || '.' || OBJECT_NAME || ' ; ' FROM dba_objects WHERE object_name LIKE '%CGGROUPDEFS%' ; commit;
(maybe you want to make a backup of the data).
TT_06_DIVAGRI_2CGGROUPDEFS