OracleTimesten7.0 Memory Database: (3) create a read-only CacheGroup

Source: Internet
Author: User
Welcome to the Oracle community forum and interact with 2 million technical staff. 1. first in sys. odbc. configure a DSN #################################### ################## [ttdemo] DriveroptTimesTentt70liblibtten. soDataStorevarTimesTentmpttdemoDatabaseChar

Welcome to the Oracle community forum and interact with 2 million technical staff> enter 1. first in sys. odbc. configure a DSN #################################### ################## [ttdemo] Driver =/opt/TimesTen/tt70/lib/libtten. so DataStore =/var/TimesTen/tmp/ttdemo DatabaseChar

Welcome to the Oracle community forum and interact with 2 million technical staff> enter

1. configure a DSN in sys. odbc. ini.

######################################## ###############
[Ttdemo]
Driver =/opt/TimesTen/tt70/lib/libtten. so
DataStore =/var/TimesTen/tmp/ttdemo
DatabaseCharacterSet = WE8ISO8859P1
TempSize = 20
PermSize = 20
Authenticate = 0
UID = test
OracleID = shacola
OraclePwd = 123456
Logging = 1
Isolation = 1
PassThrough = 0
LockLevel = 0
TypeMode = 0
######################################## ###############

2. Create an Oracle test table and prepare data

Sqlplus test/123456

Create table readtab (a number not null primary key, B VARCHAR2 (31 ));

Insert into readtab VALUES (1, 'Hello ');
Insert into readtab VALUES (2, 'World ');
COMMIT;

3. Create a cache group

Ttisql ttdemo
Call ttCacheUidPwdSet ('test', '20140901 ');
Call ttCacheStart;

Create readonly cache group readcache
Autorefresh interval 5 SECONDS
FROM readtab
(A number not null primary key, B VARCHAR2 (31 ));

4. load data

Load cache group readcache commit every 256 ROWS;

SELECT * FROM readtab;

5. Insert new data into the source table

Sqlplus test/123456
Insert into readtab VALUES (3, 'Hello ');
Insert into readtab VALUES (4, 'again ');
COMMIT;

6. Check whether the cache is refreshed.

Wait for the time specified by autorefresh interval. In this example, It is 5 seconds.

7. Check whether the test is complete.

Drop cache group readcache;

Call ttCacheStop;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.