Moving to a Different Major Release Using ttMigrate
Moving to a different major release is done through migration. Migration includes upgrading from one major TimesTen release to a new major TimesTen release, or changing the operating system platform that TimesTen runs on.
Migration involves copying out the schema and data from one database, creating a new database with the new release, and then creating the schema and inserting the data into the new database. The ttMigrate
utility is used to automate the migration of databases. See ttMigrate in the Oracle TimesTen In-Memory Database
Reference for information on the ttMigrate
utility.
Before migrating a database from one major release to another, ensure you backup the database in the old release. See ttBackup and ttRestore in Oracle TimesTen In-Memory Database Reference and Backing Up and Restoring a Database in this book for details.
Note:
TimesTen replication with Oracle Clusterware is not supported on Oracle Linux for Arm systems. If you are using Oracle Linux for Arm, Oracle Clusterware messages do not appear in any output in this example.Follow these steps to perform the upgrade:
For the old release:
-
Use the
ttAdmin
utility to close thedatabase1
database. This prevents further user connections.% ttAdmin -close database1 RAM Residence Policy : manual Manually Loaded In RAM : True Replication Agent Policy : manual Replication Manually Started : False Cache Agent Policy : manual Cache Agent Manually Started : False Database State : Closed
-
Disconnect all applications from the database. Run the
ttStatus
utility to verify there are no connections to the database (database1
, in this example).% ttStatus TimesTen status report as of Sat Oct 2 18:31:59 2021 Daemon pid 28436 port 6624 instance myinstance TimesTen server pid 28443 started on port 6625 ------------------------------------------------------------------------ ------------------------------------------------------------------------ Data store /scratch/ttuser/database1 Daemon pid 28436 port 6624 instance myinstance TimesTen server pid 28443 started on port 6625 There are 13 connections to the data store Shared Memory KEY 0x061014ae ID 491521 PL/SQL Memory Key 0x071014ae ID 524290 Address 0x5000000000 Type PID Context Connection Name ConnID Subdaemon 28440 0x0000000001893250 Manager 2047 Subdaemon 28440 0x0000000001914210 Rollback 2046 Subdaemon 28440 0x00007f55d80008c0 Deadlock Detector 2043 Subdaemon 28440 0x00007f55d807f330 Log Marker 2040 Subdaemon 28440 0x00007f55dc0008c0 Monitor 2044 Subdaemon 28440 0x00007f55dc07f330 AsyncMV 2039 Subdaemon 28440 0x00007f55e00008c0 Checkpoint 2042 Subdaemon 28440 0x00007f55e007f330 Aging 2041 Subdaemon 28440 0x00007f55e40008c0 Flusher 2045 Subdaemon 28440 0x00007f55e40a6970 HistGC 2038 Subdaemon 28440 0x00007f56600008c0 XactId Rollback 2036 Subdaemon 28440 0x00007f56641b9cb0 IndexGC 2037 Subdaemon 28440 0x00007f5668048360 Garbage Collector 2035 Closed to user connections RAM residence policy: Manual Data store is manually loaded into RAM Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. ------------------------------------------------------------------------ Accessible by group g900 End of report
-
Run the
ttVersion
utility to verify the current release.% ttVersion TimesTen Release tt22.1.1.25.0 (64 bit Linux/x86_64) (myinstance:6624) 2021-09-12T07:34:06Z Instance admin: instanceadmin Instance home directory: /scratch/ttuser/myinstance Group owner: g900 Daemon home directory: /scratch/ttuser/myinstance/info PL/SQL enabled.
-
Use the
ttMigrate
utility to copy out the schema and data from the database (database1
, in this example).% ttMigrate -c database1 /tmp/database1.data Saving profile DEFAULT Profile successfully saved. Saving profile SYSTEM Profile successfully saved. Saving user PUBLIC User successfully saved. Saving table TTUSER.COUNTRIES Saving foreign key constraint COUNTR_REG_FK Saving rows... 25/25 rows saved. Table successfully saved. Saving table TTUSER.DEPARTMENTS Saving foreign key constraint DEPT_LOC_FK Saving rows... 27/27 rows saved. Table successfully saved. Saving table TTUSER.EMPLOYEES Saving index TTUSER.TTUNIQUE_0 Saving foreign key constraint EMP_DEPT_FK Saving foreign key constraint EMP_JOB_FK Saving rows... 107/107 rows saved. Table successfully saved. Saving table TTUSER.JOBS Saving rows... 19/19 rows saved. Table successfully saved. Saving table TTUSER.JOB_HISTORY Saving foreign key constraint JHIST_DEPT_FK Saving foreign key constraint JHIST_EMP_FK Saving foreign key constraint JHIST_JOB_FK Saving rows... 10/10 rows saved. Table successfully saved. Saving table TTUSER.LOCATIONS Saving foreign key constraint LOC_C_ID_FK Saving rows... 23/23 rows saved. Table successfully saved. Saving table TTUSER.REGIONS Saving rows... 4/4 rows saved. Table successfully saved. Saving view TTUSER.EMP_DETAILS_VIEW View successfully saved. Saving sequence TTUSER.DEPARTMENTS_SEQ Sequence successfully saved. Saving sequence TTUSER.EMPLOYEES_SEQ Sequence successfully saved. Saving sequence TTUSER.LOCATIONS_SEQ Sequence successfully saved.
-
Unload the database from memory. This example assumes a RAM policy of manual. See Specifying a RAM Policy in the Oracle TimesTen In-Memory Database Operations Guide for information on the RAM policy.
% ttAdmin -ramUnload database1 RAM Residence Policy : manual Manually Loaded In RAM : False Replication Agent Policy : manual Replication Manually Started : False Cache Agent Policy : manual Cache Agent Manually Started : False Database State : Closed
-
Stop the TimesTen main daemon.
% ttDaemonAdmin -stop TimesTen Daemon (PID: 28436, port: 6624) stopped.
-
Copy the migrated object files (
/tmp/database1.data
, in this example) to a file system that is accessible by the instance in the new release.
For the new release:
Once the database is operational in the new release, create a backup of this database to have a valid restoration point for your database. Once you have created a backup of your database, you may delete the ttMigrate
copy of your database (in this example, /tmp/database1.data
). Optionally, for the old release, you can remove the instance and delete the installation.
Ensure you recompile and relink existing ODBC and OCI applications after you perform the upgrade and before you use the new release of TimesTen. See Overview of ODBC API Incompatibilities in the Oracle TimesTen In-Memory Database C Developer's Guide for more information.