Timesten upgrade, timesten
TtIsql "DSN = ttwind; UID = cacheuser; PWD = cacheuser; OraclePWD = cacheuser ;"
-- 1. view the current version
Command> version
TimesTen Release 11.2.2.7.0
Command> cachegroups;
Cache Group CACHEUSER. CACHETBLORDERS:
Cache Group Type: Read Only
Autorefresh: Yes
Autorefresh Mode: Incremental
Autorefresh State: On
Autorefresh Interval: 10 Seconds
Autorefresh Status: OK
Aging: No aging defined
Root Table: SCOTT. TBLORDERS
Table Type: Read Only
Command> select count (*) from scott. tblorders;
& Lt; 111001 & gt;
-- 2. Disconnect all connections to TT
-- 3. Back up the database and configuration file
Mkdir/backup
TtBackup-type fileFull-dir/backup-fname ttwindbk-force-connstr "DSN = ttwind"
Cp/data/app/timesten/TimesTen/ttwind/info/sys. odbc. ini/backup/
Cp/data/app/timesten/TimesTen/ttwind/tnsnames. ora/backup/
-- 4. Delete cachegroup
TtIsql "DSN = ttwind; UID = cacheuser; PWD = cacheuser; OraclePWD = cacheuser ;"
Call ttcachestop;
DROP Cache Group cachetblorders;
Exit;
-- 5. Detach memory
TtDaemonAdmin-stop
Ttadmin-ramunload ttwind -- either
-- 6. Destroy the database
TtDestroy ttwind;
-- 7. Delete the old directory (optional)
Rm-rf/etc/TimesTen/
Rm-rf/data/app/timesten/
-- 7. install timesten new version
Mkdir/etc/TimesTen
Mkdir-p/data/app/timesten
Chgrp-R ttadmin/etc/TimesTen
Chgrp-R ttadmin/data/app/timesten
Chmod 770/etc/TimesTen/
Chmod 770/data/app/timesten
Chmod 660/etc/TimesTen /*
Chown-R ocpyang. ttadmin/soft
Ls/soft
Unzip tt11.2.2.8.2 \. zip
Cd/soft/linux8664/
$./Setup. sh
NOTE: Each TimesTen installation is identified by a unique instance name.
The instance name must be a non-null alphanumeric string, not longer
Than 255 characters.
# Step 1: Enter the name of the installation instance
Please choose an instance name for this installation? [Tt1122] ttwind # enter the custom name
Instance name will be 'ttwind '.
Is this correct? [Yes] yes
# Step 2: Install Components
Of the three components:
[1] Client/Server and Data Manager
[2] Data Manager Only
[3] Client Only
Which wocould you like to install? [1] 1 # input 1
# Step 3: installation location
Of the following options:
[1]/home/ocpyang
[2]/soft
[3] Specify a location
[Q] Quit the installation
Where wocould you like to install the ttwind instance of TimesTen? [1] 3 # input 3 to customize an installation directory
Please specify a directory to install TimesTen? [/Home/ocpyang]/data/app/timesten/# enter a custom installation directory
Where wocould you like to create the daemon home directory? [/Data/app/timesten/TimesTen/ttwind/info]
The daemon logs will be located in/data/app/timesten/TimesTen/ttwind/info
Wocould you like to specify a different location for the daemon logs? [No]
Uncompressing...
NOTE: If you are using ing TimesTen for use with Oracle Clusterware,
Daemon port number must be the same authentication SS all TimesTen installations
Managed within the same Oracle Clusterware cluster.
NOTE: All installations that replicate to each other must use the same daemon
Port number that is set at installation time. The daemon port number can
Be verified by running 'ttversion '.
# Step 4: Enter the custom master process port number
The default port number is 53396.
Do you want to use the default port number for the TimesTen daemon? [Yes] no # enter the no custom Port
Please enter a unique port number for the TimesTen daemon (<CR> = list )? [] 53355 # enter a custom Port
NOTE: For security, we recommend that you restrict access to
TimesTen installation to members of a single OS group. Only members
That OS group will be allowed to perform direct mode connections
TimesTen, and only members of that OS group will be allowed to perform
Operations that access TimesTen data stores, TimesTen files and shared
Memory. The OS group defaults to the primary group of the instance
Administrator. You can default to this group, choose another OS group
Or you can make this instance world-accessible. If you choose to make
This instance world-accessible, all database files and shared memory
Are readable and writable by all users.
# Step 5: default for restricted sessions and PL/SQL Functions
Restrict access to the TimesTen installation to the group 'ttadmin '? [Yes]
NOTE: Enabling PL/SQL will increase the size of some TimesTen libraries.
Wocould you like to enable PL/SQL for this instance? [Yes] yes
# Step 6: Specify the TNS_ADMIN environment variable during installation
------------------------------------------------------------------------------
Remember: The final tnsnames. ora must be in this directory; otherwise, an error is reported.
Command> create readonly cache group cachtest
> From scott. t2
> (
> Sid int not null primary key,
> Sname varchar2 (10)
> );
Warning 5923: Cache agent has deferred the create/alter cache group request because it is not connected to Oracle yet
Or
Command> load cache group cachtest commit every 10 rows;
5056: The cache operation fails: error_type = <Oracle Error>, error_code = <12541>, error_message: ORA-12541: TNS: no listener
The command failed.
------------------------------------------------------------------------------
In order to use the 'In-Memory Database Cache' feature in any databases
Created within this installation, you must set a value for the TNS_ADMIN
Environment variable. It can be left blank, and a value can be supplied later
Using <install_dir>/bin/ttModInstall.
TNS_ADMIN exists in your environment and is set:
/U01/app/oracle/product/11.2.0/db_1/network/admin
Wocould you like to use this TNS_ADMIN setting for the Oracle TimesTen Application-Tier Database Cache? [Yes] no
Please enter a value for TNS_ADMIN (s = skip )? []/Data/app/timesten/TimesTen/ttwind
# Input/data/app/timesten/TimesTen/ttwind
TNS_ADMIN will be set to/app/timesten/TimesTen
You can change TNS_ADMIN later by running <install_dir>/bin/ttmodinstall.
NOTE: It appears that you are running version 4 or higher of the g ++
Compiler. TimesTen ships with multiple sets of client libraries and server
Binaries: one built for compatibility with g ++ 3.4.6 and one
G ++ 4.1.0. The installer has created links to the 4.1.0 library in
<Install_dir>/lib directory and to the 4.1.0 server binary in
<Install_dir>/bin directory. If you want to use a different compiler,
Please modify the links to point to the desired library and server binary.
Installing server components...
# Step 7: TimesTen server port number
Installing server components...
What is the TCP/IP port number that you want the TimesTen Server to listen on? [53356] 53356 # Add 1 to the master process port number
Do you want to install the Quick Start Sample Programs and the TimesTen Documentation? [No]
Wocould you like to install the documentation (without the Quick Start Sample Programs )? [Yes]
Where wocould you like to create the doc directory? [/Data/app/timesten/TimesTen/ttwind/doc]
The TimesTen documentation has been installed in/data/app/timesten/TimesTen/ttwind/doc.
Installing client components...
Wocould you like to use TimesTen Replication with Oracle Clusterware? [No]
NOTE: The TimesTen daemon startup/shutdown scripts have not been installed.
Run the 'setuproot' script:
Cd/data/app/timesten/TimesTen/ttwind/bin
./Setuproot-install
This will move the TimesTen startup script into its appropriate location.
The startup script is currently located here:
'/Data/app/timesten/TimesTen/ttwind/startup/tt_ttwind '.
The 11.2.2.8 Release Notes are located here:
'/Data/app/timesten/TimesTen/ttwind/README.html'
Starting the daemon...
TimesTen Daemon startup OK.
End of TimesTen installation.
--- Copy the configuration files of earlier versions and tnsnames. ora
Cp/backup/tnsnames. ora/data/app/timesten/TimesTen/ttwind/
Cp/backup/sys. odbc. ini/data/app/timesten/TimesTen/ttwind/info/sys. odbc. ini
Mkdir-p/data/app/timesten/TimesTen/ttwind/info/datastore/ttwind
Chmod-R 770/data/app/timesten/TimesTen/ttwind/info/datastore/ttwind
---- Start with the Administrator
TtIsql ttwind
--- Determine whether the related user permissions in the database exist
Command> select * from SYS. CACHE_GROUP;
<CACHETBLORDERS, CACHEUSER, 3846792,179 8032, 906F1B0000000000, 0000000000000000, #, SCOTT. TBLORDERS #, #, ORCL \ 000 \ 000 \ 000 \ 000, 0, 1, \ 000 \ 000 \ 000 \ 000, I, Y, 0, <NULL>, 10000, 0, 05010000,383 632303000000000000000000000000000000000000000000000000000000000000000000000, 88555 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 000 \ 0003801151501201532021515012015,100 00, 0, <NULL>, <NULL>, 00000000>
1 row found.
Command> select * from sys. user $;
<0, SYS, 1, 0, <NULL>, 11:30:35. 496049, <NULL>, <NULL>, 2825416, 0, 0, 0000,000 too many other than>
<1, PUBLIC, 0, 0, <NULL>, 11:30:35. 496049, <NULL>, <NULL>, 2825432, 0, 0, 0000,000 too many other than 00000000000000000>
<2, TTREP, 1, 0, <NULL>, 11:30:35. 496049, <NULL>, <NULL>, 2825448, 0, 0, 0000,000 rows were too large before>
<3, SYSTEM, 1, 0, <NULL>, 11:30:35. 496049, <NULL>, <NULL>, 2825464, 0, 0, 0000,000 too many milliseconds before creating>
<4, GRID, 1, 0, <NULL>, 11:30:35. 496049, <NULL>, <NULL>, 2825480, 0, 0, 0000,000 too many minutes before creating>
<10, OCPYANG, 1, 0, <NULL>, 11:30:35. 496049, <NULL>, <NULL>, 2825496, 1, 0, 0000,000 rows were too large before>
<11, CACHEUSER, 1, 0, $ tten1 $03e8 $ hour, 11:33:10. 551269, <NULL>, <NULL>, 2825512, 0, 0, 0000,000 too many other than 0000000000000>
<12, SCOTT, 1, 0, $ tten1 $03e8 $ encrypt/HjbBnR3xrcAy96XZovf7n, 11:33:29. 371828, <NULL>, <NULL>, 2825528, 0, 0, 0000,000 million rows exceed 00000000000000000>
-- 8. Restore data
TtDaemonAdmin-start
Rm-rf/data/app/timesten/TimesTen/ttwind/info/datastore/ttwind. ds *
Rm-rf/data/app/timesten/TimesTen/ttwind/info/datastore/ttwind. log *
Rm-rf/data/app/timesten/TimesTen/ttwind/info/datastore/ttwind. res **
TtRestore-dir/backup-fname ttwindbk-noconn-connstr "DSN = ttwind"
TtIsql "DSN = ttwind; UID = cacheuser; PWD = cacheuser; OraclePWD = cacheuser ;"
Call ttCacheStart;
--- 9. Verify the recovery result
$ Ttversion
TimesTen Release 11.2.2.8.2 (64 bit Linux/x86_64) (ttwind: 53355) 2015-02-24T18: 59: 40Z
Instance admin: ocpyang
Instance home directory:/data/app/timesten/TimesTen/ttwind
Group owner: ttadmin
Daemon home directory:/data/app/timesten/TimesTen/ttwind/info
PL/SQL enabled.
Command> version
TimesTen Release 11.2.2.8.2
Command> cachegroups;
Cache Group CACHEUSER. CACHETBLORDERS:
Cache Group Type: Read Only
Autorefresh: Yes
Autorefresh Mode: Incremental
Autorefresh State: On
Autorefresh Interval: 10 Seconds
Autorefresh Status: C
Aging: No aging defined
Root Table: SCOTT. TBLORDERS
Table Type: Read Only
1 cache group found.
Command> select count (*) from scott. tblorders;
& Lt; 111001 & gt;
1 row found.