dba:oracle:docs:timesten
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
dba:oracle:docs:timesten [2023/01/31 08:22] – removed - external edit (Unknown date) 127.0.0.1 | dba:oracle:docs:timesten [2023/01/31 08:22] (current) – ↷ Page moved from dba:oracle:timesten to dba:oracle:docs:timesten dodger | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== [DOC] Timesten ====== | ||
+ | |||
+ | |||
+ | |||
+ | Investigate: | ||
+ | * SYS.SYSTEMSTATS | ||
+ | * read committed or < | ||
+ | * autocommit defaults on, but recommends off | ||
+ | |||
+ | |||
+ | ====== Micro-howtos ====== | ||
+ | |||
+ | ===== Create database ===== | ||
+ | |||
+ | ==== Windows ==== | ||
+ | * open dsn admin | ||
+ | * Create a new dsn | ||
+ | * Select TimesTen Data manager | ||
+ | * Select the Data & logs path | ||
+ | * Configure some ops (if you want) | ||
+ | * create dsn | ||
+ | * Open cmd | ||
+ | * run ttenv.bat | ||
+ | * run ''" | ||
+ | * Create a user: | ||
+ | <code sql> | ||
+ | CREATE USER < | ||
+ | GRANT CREATE SESSION, CREATE TABLE TO < | ||
+ | </ | ||
+ | |||
+ | Maybe you also must give that user | ||
+ | |||
+ | Connect as the user: | ||
+ | <code sql> | ||
+ | connect " | ||
+ | </ | ||
+ | |||
+ | ==== Linux ==== | ||
+ | * Login as the user that installed TimesTen | ||
+ | * cd to the " | ||
+ | < | ||
+ | cd / | ||
+ | </ | ||
+ | * edit '' | ||
+ | * Define a new DSN under "[ODBC Data Sources]" | ||
+ | < | ||
+ | [ODBC Data Sources] | ||
+ | test-ttdb=TimesTen 11.2.2 Driver | ||
+ | </ | ||
+ | * Define the settings of the new DSN under "new data source" | ||
+ | < | ||
+ | ##################################################################### | ||
+ | # | ||
+ | # New data source definitions can be added below. | ||
+ | # | ||
+ | ##################################################################### | ||
+ | [test-ttdb] | ||
+ | Driver=/ | ||
+ | DataStore=/ | ||
+ | LogDir=/ | ||
+ | PermSize=1024 | ||
+ | TempSize=512 | ||
+ | DatabaseCharacterSet=AL32UTF8 | ||
+ | </ | ||
+ | * Create directories with permissions for the user: | ||
+ | < | ||
+ | mkdir -p / | ||
+ | </ | ||
+ | * run ''" | ||
+ | * Create a user: | ||
+ | <code sql> | ||
+ | CREATE USER < | ||
+ | GRANT CREATE SESSION, CREATE TABLE TO < | ||
+ | </ | ||
+ | Connect as the user: | ||
+ | <code sql> | ||
+ | connect " | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== create a cache grid ==== | ||
+ | 1st of all, in the OracleDB run the following scripts as sysdba: | ||
+ | <code sql> | ||
+ | @initCacheGlobalSchema.sql | ||
+ | @grantCacheAdminPrivileges.sql | ||
+ | </ | ||
+ | Both are located on the TimesTen installation (// | ||
+ | This time I use the user named on the TT db creation. | ||
+ | |||
+ | Then create the grid on TimesTen: | ||
+ | < | ||
+ | call ttGirdCreate(' | ||
+ | call ttGirdNameSet(' | ||
+ | </ | ||
+ | |||
+ | |||
+ | =====Steps to remove Cache groups and Cache Grid from TimesTen and Oracle (Doc ID 836887.1)===== | ||
+ | |||
+ | TimesTen side: | ||
+ | < | ||
+ | call ttGridDetach; | ||
+ | call ttrepstop; | ||
+ | DROP CACHE GROUP tester.writecache; | ||
+ | DROP CACHE GROUP tester.dummy_cli; | ||
+ | call ttGridDestroy(' | ||
+ | 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; | ||
+ | </ | ||
+ | |||
+ | =====Steps to add a TimesTen node into an existing Cache Grid (Doc ID 842990.1)===== | ||
+ | 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(' | ||
+ | |||
+ | call ttGridNameSet(' | ||
+ | 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,' | ||
+ | </ | ||
+ | |||
+ | 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; | ||
+ | </ | ||
+ | |||
+ | ====== Commands ====== | ||
+ | From ttisql | ||
+ | ===== Size of the db ===== | ||
+ | <code sql> | ||
+ | dssize; | ||
+ | </ | ||
+ | ==== Proceses ==== | ||
+ | <code sql> | ||
+ | host ttstatus ; | ||
+ | </ | ||
+ | |||
+ | ==== Pause Cache Group Autorefresh ==== | ||
+ | <code sql> | ||
+ | ALTER CACHE GROUP < | ||
+ | </ | ||
+ | |||
+ | ==== Disable Cache Group Autorefresh ==== | ||
+ | <code sql> | ||
+ | ALTER CACHE GROUP < | ||
+ | </ | ||
+ | ==== Enable Cache Group Autorefresh ==== | ||
+ | <code sql> | ||
+ | ALTER CACHE GROUP < | ||
+ | </ | ||
+ | |||
+ | ==== Refresh cache group ==== | ||
+ | <code sql> | ||
+ | </ | ||
+ | |||
+ | ==== Load cache group ==== | ||
+ | <code sql>LOAD CACHE GROUP < | ||
+ | </ | ||
+ | |||
+ | ==== Unload cache group ==== | ||
+ | <code sql> | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== list all cache groups ==== | ||
+ | <code sql> | ||
+ | </ | ||
+ | |||
+ | More detailed | ||
+ | <code sql> | ||
+ | </ | ||
+ | |||
+ | ==== list all tables ==== | ||
+ | <code sql> | ||
+ | </ | ||
+ | |||
+ | With cache group: | ||
+ | <code sql> | ||
+ | SELECT T.TBLNAME, T.TBLOWNER, CG.CGNAME | ||
+ | FROM SYS.TABLES T, SYS.CACHE_GROUP CG | ||
+ | WHERE T.CACHEGROUP=CG.CGID | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | ===== Cache Agent ===== | ||
+ | ==== Stop ==== | ||
+ | <code sql> | ||
+ | call ttCacheStop; | ||
+ | </ | ||
+ | ==== Start ==== | ||
+ | <code sql> | ||
+ | call ttCacheStart; | ||
+ | </ | ||
+ | |||
+ | =====Setup TNS_ADMIN===== | ||
+ | < | ||
+ | ttmodinstall -tns_admin D: | ||
+ | </ | ||
+ | |||
+ | ====== Utilities ====== | ||
+ | From [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | ===== ttAdmin ===== | ||
+ | |||
+ | ==== Start Caching ==== | ||
+ | < | ||
+ | ttAdmin -cacheStart " | ||
+ | </ | ||
+ | ==== Stop Caching ==== | ||
+ | < | ||
+ | ttAdmin -cacheStop " | ||
+ | </ | ||
+ | |||
+ | ==== Ram Policy ==== | ||
+ | |||
+ | * Always loaded | ||
+ | < | ||
+ | ttAdmin -ramPolicy always SalesData | ||
+ | </ | ||
+ | * Only in use | ||
+ | < | ||
+ | ttAdmin -ramPolicy inUse SalesData | ||
+ | </ | ||
+ | * Manually | ||
+ | < | ||
+ | ttAdmin -ramPolicy manual SalesData | ||
+ | </ | ||
+ | * When manual, load: | ||
+ | < | ||
+ | ttAdmin -ramLoad SalesData | ||
+ | </ | ||
+ | * When manual, unload: | ||
+ | < | ||
+ | ttAdmin -ramUnload SalesData | ||
+ | </ | ||
+ | ====== Troubleshotting ====== | ||
+ | ===== tt15105 ===== | ||
+ | Error sample: | ||
+ | < | ||
+ | PS C: | ||
+ | |||
+ | Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. | ||
+ | Type ? or " | ||
+ | |||
+ | connect " | ||
+ | 15105: User XXXX requesting database creation is not the instance administrator. | ||
+ | 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 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 Release 11.2.2.7.4 (64 bit NT) (tt1122_64: | ||
+ | Instance admin: dodger | ||
+ | Instance home directory: C: | ||
+ | Group owner: CIBERTERMINAL\Domain Users | ||
+ | Daemon home directory: C: | ||
+ | PL/SQL enabled. | ||
+ | </ | ||
+ | | ||
+ | And Connect/ | ||
+ | < | ||
+ | PS C: | ||
+ | |||
+ | Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. | ||
+ | Type ? or " | ||
+ | |||
+ | |||
+ | |||
+ | connect " | ||
+ | Connection successful: DSN=DIVAPRE_TT; | ||
+ | (Default setting AutoCommit=1) | ||
+ | Command> | ||
+ | </ | ||
+ | |||
+ | ===== No Oracle password ===== | ||
+ | This error is either in sqldeveloper or ttIsql: | ||
+ | < | ||
+ | No Oracle password found in connection. | ||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ===== TT5907 ===== | ||
+ | |||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== TT5002 / TT5051 ===== | ||
+ | < | ||
+ | Warning | ||
+ | Warning | ||
+ | </ | ||
+ | |||
+ | Start (or restart) the cache agent: | ||
+ | < | ||
+ | ttadmin -cacheStart myDSN | ||
+ | ttadmin -cacheStop myDSN | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== TT5221 ===== | ||
+ | < | ||
+ | 5221: Oracle syntax error in OCIStmtExecute(): | ||
+ | </ | ||
+ | While executing [[http:// | ||
+ | < | ||
+ | |||
+ | I found that ALL THE PARAMETERS need to be between single quotation mark! | ||
+ | |||
+ | ===== TT3344 ===== | ||
+ | Whole stack: | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | While executing [[http:// | ||
+ | |||
+ | 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, | ||
+ | <code sql> | ||
+ | select owner, object_name, | ||
+ | from dba_objects | ||
+ | where object_name like ' | ||
+ | </ | ||
+ | And delete the data: | ||
+ | <code sql> | ||
+ | FROM dba_objects | ||
+ | where object_name like ' | ||
+ | |||
+ | commit; | ||
+ | </ | ||
+ | |||
+ | (maybe you want to make a backup of the data). | ||
+ | |||
+ | |||
+ | ===== TT3316 ===== | ||
+ | |||
+ | |||
+ | Whole stack: | ||
+ | < | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > " | ||
+ | > | ||
+ | > | ||
+ | 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: | ||
+ | <code sql> | ||
+ | select owner, object_name, | ||
+ | from dba_objects | ||
+ | where object_name like ' | ||
+ | </ | ||
+ | And delete the data: | ||
+ | <code sql> | ||
+ | FROM dba_objects | ||
+ | where object_name like ' | ||
+ | |||
+ | commit; | ||
+ | </ | ||
+ | |||
+ | (maybe you want to make a backup of the data). | ||
+ | |||
+ | |||
+ | TT_06_DIVAGRI_2CGGROUPDEFS | ||
+ | ====== Links ====== | ||
+ | * http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | <code sql> | ||
+ | </ | ||