Task 5: Perform the Initial Data Load
Before starting the cache operations is to perform an initial data load of what is currently in the tables that are to be cached.
-
On the host with the Oracle database, determine the current SCN value (using SQL*Plus):
SQL> SELECT CURRENT_SCN FROM V$DATABASE; CURRENT_SCN ----------- 2791297 -
On the host with the TimesTen database, connect to the TimesTen database as the
cacheadminuser specifying both the TimesTen and Oracle database passwords for this user:$ ttIsql -connStr "DSN=cache1;UID=cacheadmin;PWD=ttpwd;OraclePWD=ttpwd"
-
Load the data for each of the tables based on the Oracle database SCN value determined above:
Command>call ttLoadFromOracle('oratt', 'customer', 'SELECT * FROM oratt.customer AS OF scn 2791297'); Command>call ttLoadFromOracle('oratt', 'orders', 'SELECT * FROM oratt.orders AS OF SCN 2791297'); Command>call ttLoadFromOracle('oratt', 'item', 'SELECT * FROM oratt.item AS OF SCN 2791297'); -
Update the optimizer statistics for the tables that you just loaded to ensure optimal query plans in TimesTen:
Command> statsupdate customer; Command> statsupdate orders; Command> statsupdate item;