Combat: Oracle TimesTen 11.2.2.7.0 on CentOS 6.5

Source: Internet
Author: User
Tags documentation dsn passthrough delete cache server port

Entry level, but the steps are meticulous, there is no theory, can be used as an introductory manual.
1. New User ******************************** -----1.create OS User and group Groupadd ttadmingroupadd TimesTen mkdir/etc/ Timestenmkdir-p/app/timestenchgrp-r ttadmin/etc/timestenchgrp-r ttadmin/app/timestenchmod 770/etc/timesten/chmod 7 70/app/timesten chmod 660/etc/timesten/*useradd-d/home/ocpyang-g ttadmin-g timesten,dba ocpyangpasswd Ocpyangocpyan Gusermod-a-G Timesten,oinstall,dba ocpyang********************************************************************** **2.linux Platform Installation Preparation ************************************************************************-------------1.OS Kernel parameter---1.1 gkfx memorary configkernel.shmmax=68719476736kernel.shmall=16777216/****config 64g memorary64 x 1024x768 x 1024x768 x 1024x768 = 68719476736 and 68719476736/4096 = 16777216****//sbin/sysctl-p---1.2HugePages confige Cho >/proc/sys/vm/nr_hugepages vi/etc/sysctl.conf #config timesten INstance 16g and huge page size is 2m.vm.nr_hugepages = 8192 #ttadmin Group Idvm.hugetlb_shm_group = 503/sbin/sysctl-p ---1.3 semaphores config#vi/etc/sysctl.conf#/sbin/sysctl-a | grep semkernel.sem = 32000 128/sbin/sysctl-p---1.4 Rep and IMDb Cache1). Configure network parameters for replication, TCP send and receive buffers should be increased to 4MB, in/etc/s Add the following line to the ysctl.conf file: #vi/etc/sysctl.confnet.ipv4.tcp_rmem=4096 4194304 4194304net.ipv4.tcp_wmem=98304 4194304 4194304net.core.rmem_default=65535net.core.wmem_default=65535net.core.rmem_max=4194304net.core.wmem_max= 4194304NET.IPV4.TCP_WINDOW_SCALING=12). Configure network parameters for the IMDB cache,tcp send and receive buffers should be increased more, modify the/etc/sysctl.conf file to add the following line: #vi/ etc/sysctl.confnet.ipv4.tcp_rmem=4096 4194304 4194304net.ipv4.tcp_wmem=98304 4194304 4194304net.core.rmem_default= 262144net.core.wmem_default=262144net.core.rmem_max=4194304net.core.wmem_max=4194304net.ipv4.tcp_window_ scaling=1net.ipv4.ip_local_port_range=1024 65000 The two amendments to the appeal were amended to: # # # # # # #REP和IMDB cachenet.ipv4.tcp_rmem=4096 4194304 4194304net.ipv4.tcp_wmem=98304 41943044194304net.core.rmem_default=262144net.core.wmem_default=262144net.core.rmem_max=4194304net.core.wmem_max= 4194304net.ipv4.tcp_window_scaling=1net.ipv4.ip_local_port_range=1024 65000 2). Restart the configuration to take effect or run the following command: #/sbin/sysctl-p * * 3.soft install*************************** ---3.1 Mounting Jdkjava-versionrpm-qa |  grep java$ Whoamiocpyang---3.2 installation timestencd/soft/linux8664/$./setup.sh Note:each TimesTen installation is identified by      A unique instance name. The instance name must is a non-null alphanumeric string, not longer than 255 characters. #步骤1: Enter the installation instance name please choose a n Instance name for this installation? [tt1122] Ttwind #输入自定义的名字Instance name would be ' Ttwind '. Is this correct? [Yes] yes# Step 2: Install components of the three component: [1] client/server and Data Manager [2] Data Manager only [3] Client ONLYWH Ich would do I like to install? [1] 1 #输入1 # Step 3: Mounting position of the following options: [1]/home/ocpyang [2]/soft [3] Specify a location [Q] Quit the installationwhere would your like to install the TTWI nd instance of TimesTen? [1] 3 #输入3 Customizing an installation directory specify a directory to install TimesTen? [/home/ocpyang]/app/timesten #输入自定义一个安装目录Where would to create the daemon home directory? [/app/timesten/timesten/ttwind/info] The daemon logs'll be located in/app/timesten/timesten/ttwind/infowould a specify location for th E daemon logs? [No] Uncompressing ...  Note:if You is configuring TimesTen for use with Oracle Clusterware, the daemon port number must be the same across 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's set at installation Time. The daemon port number can be verified by running ' ttversion '. #步骤4: Enter the custom main process port numbers the default port is 53396. Want to use the DEfault port number for the TimesTen daemon? [Yes] no #输入no custom port Please enter a unique port number for the TimesTen daemon (<cr>=list)? [] 53355 #输入自定义端口NOTE: For security, we recommend this restrict access to the TimesTen installation to members of a single OS group. Only members of the that OS group would be allowed to perform direct mode connections to TimesTen, and only members O      F that OS Group would 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 the this group, choose another OS group or your can make this instance world-accessible. If you choose to make this instance world-accessible, all database files and shared memory is readable and writ Able by all users. #步骤5: Restricted sessions and PL/SQL features by default restrict access to the TimesTen installation to the group ' ttadmin '? [Yes] Note:enabling PL/SQL would INcrease the size of some timesten libraries. Would how to enable PL/SQL for this instance? [Yes] yes# Step 6: Specify Tns_ when installing Admin environment variable------------------------------------------------------------------------------remember: the Last Tnsnames.ora need to put in this directory a copy, otherwise error command> create readonly cache group Cachtest > from Scott.t2 > (&G T SID int NOT NULL primary key, > Sname varchar2 (Ten) >); Warning 5923:cache Agent has deferred the Create/alter Cache group request because it's not connected to Oracle yet or COM mand> Load Cache group Cachtest commit every rows; 5056:the cache Operation Fails:error_type=<oracle Error>, Error_code=<12541>, error_message:ora-12541: Tns:no listenerthe Command Failed.------------------------------------------------------------------------------in order to use the ' in-memory Database Cache ' feature in no databasescreated within this installation, you must set a value for the Tns_adminenvironmen T variable. It can be LeFT blank, and a value can be supplied laterusing <install_dir>/bin/ttmodinstall.please Enter a value for Tns_admin ( S=SKIP)? []/app/timesten/timesten/ttwind/#输入/app/timesten/timesten/ttwind/ntns_admin'll be set to/app/timesten/ Timestenyou can change tns_admin later by running <install_dir>/bin/ttmodinstall. Note:it appears that is running version 4 or higher of the g++ compiler. TimesTen ships with multiple sets of the client libraries and server binaries:one built for compatibility with g++ 3.4. 6 and one with g++ 4.1.0.  The installer have created links to the 4.1.0 library in the <install_dir>/lib directory and to the 4.1.0 server Binary in the <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 ... #步骤7: TimesTen Server port number installing server components ... What is the TCP/IP port number so you want the TimestEn Server to listen on? [53356] 53356 #主进程端口号加1Do want to install the Quick Start Sample Programs and the TimesTen documentation? [No] Would to install the documentation (without the Quick Start Sample Programs)? [Yes] Where would to create the doc directory? [/app/timesten/timesten/ttwind/doc] The TimesTen documentation has been installed In/app/timesten/timesten/ttwind/doc. Installing client components ... Would do I use TimesTen Replication with Oracle clusterware? [No] Note:the timesten daemon Startup/shutdown scripts has not been installed. Run the ' setuproot ' Script:cd/app/timesten/timesten/ttwind/bin/setuproot-installthis would move the TimesTen startup Script into it appropriate location. The startup script is currently located here: '/app/timesten/timesten/ttwind/startup/tt_ttwind '. The 11.2.2.7 Release Notes is located here: '/app/timesten/timesten/ttwind/readme.html ' starting the daemon ... TimesTen Daemon startup OK. End of TimeSTen installation.---3.3 Setting user variables VI ~/.bash_profileexport oracle_home=/u01/app/oracle/product/11.2.0/db_1export TNS_ admin= $ORACLE _home/network/adminexport tt_home=/app/timesten/timesten/ttwind/export PATH= $PATH: $TT _home/bin:$ Oracle_home/binld_library_path=/app/timesten/timesten/ttwind/libexport Ld_library_path=${ld_library_path}:/lib :/usr/lib:/usr/local/lib: $ORACLE _home/libsource ~/.bash_profile---3.4 copy tnsnames file cp/u01/app/oracle/product/ 11.2.0/db_1/network/admin/tnsnames.ora/app/timesten/timesten/ttwind/****************************************** 4. Create a new cache instance ************************************************************************ ---------4.1 Oracle Database Create related users and permissions-Step 1: Create a new table space store timesten data dictionary table create tablespace ttspace datafile '/u01/app/oracle/ ORADATA/ORCL/TTSPACE01.DBF ' SIZE 10M autoextend on next 10m maxsize 30g;@ $TT _home/oraclescripts/ Initcacheglobalschema.sql "Ttspace" alter user TimesTen identified by timesten;--Step 2: Create a new database synchronize users create user Cacheuser IdentiFiEd by Cacheuser DEFAULT tablespace Ttspacequota UNLIMITED in ttspace;grant connect,resource to cacheuser;@ $TT _home/oracle Scripts/grantcacheadminprivileges "Cacheuser"--Step 3: Authorization form to CACHEUSER user Conn scott/tigercreate table t1 (SID int NOT NULL Primary key,sname varchar2); insert into T1 values (101, ' Wind '); INSERT into T1 values (102, ' Snow ');  Grant Select,insert,update,delete on Scott.t1 to Cacheuser; Grant all on scott.t1 to Cacheuser;-------4.2 TimesTen side Create related users and permissions----Step 0: Modify the DSN and set the required data directory file #vi/app/timesten/timesten/ Ttwind/info/sys.odbc.ini [ttwind]driver=/app/timesten/timesten/ttwind/lib/libtten.sodatastore=/app/timesten/ timesten/ttwind/info/datastore/ttwindpermsize=40tempsize=32plsql=1databasecharacterset= Zhs16gbkconnectioncharacterset=zhs16gbkoraclenetservicename=orclmkdir-p/app/timesten/timesten/ttwind/info/ Datastore/ttwindchmod-r 770/app/timesten/timesten/ttwind/info/datastore/ttwind ttIsql Ttwind-step 1:cache Manage user Create USER Cacheuser identified by Cacheuser; GRANT CREATE SESSION, CAche_manager, CREATE any table,drop any TABLE to Cacheuser; --Step 2:cache corresponding users create user Scott identified by Tiger;grant create session, Adminto Scott; --Step 3: Associate the Oracle Cache management user with the TimesTen, set the user name and password for the Oracle connection, and the cache agent will use this username and password to read the call Ttcacheuidpwdset in Oracle ('  Cacheuser ', ' cacheuser '); --Step 4: Create the cache grid$ Ttisql "Dsn=ttwind; Uid=cacheuser; Pwd=cacheuser;oraclepwd=cacheuser "Command> call Ttgridcreate (' Mygrid ');--Step 5: Cache database and Cache The grid association is to set the current grid as the newly created mygridcommand> call Ttgridnameset (' Mygrid ');--Step 6: Test autocommit 0;set passthrough 2;select * From V$version;select table_name to user_tables where table_name like '%mygrid% '; set passthrough 0; --Step 7: Test read-only cache set $ ttisql "Dsn=ttwind; Uid=cacheuser; Pwd=cacheuser;oraclepwd=cacheuser "Ttisql" dsn=ttwind; Uid=cacheuser; PWD=CACHEUSER;ORACLEPWD=CACHEUSER;ORACLENETSERVICENAME=ORCL "Call Ttcachestart;call ttCacheStop;drop Cache Group Cachtest;create readonly Cache Group Cachtestautorefresh interval 5 secondsmode incrementalfrom scott.t1 (sid int not null primary key,sname VARCHAR2 (10)); View all user tables under User sqltables; View user under All cachecachegroups;--Delete cache Groupdrop Cache Group cachtest;--loading Load cache group Cachtest commit every rows;**************************************************** 5.Timesten fast loading of tables and data in Oracle database ************************************************************* Ttisql "Dsn=ttwind; Uid=cacheuser; Pwd=cacheuser; "Ttisql" dsn=ttwind; Uid=cacheuser; PWD=CACHEUSER;ORACLEPWD=CACHEUSER;ORACLENETSERVICENAME=ORCL "Ttisql" dsn=ttwind; Uid=cacheuser; Pwd=cacheuser;oraclepwd=cacheuser; ORACLEID=ORCL "autocommit 0;set passthrough 2;--Generate table structure call Tttableschemafromoraqueryget (' Scott ', ' emp ', ' SELECT * from Scott.emp ');--Import data call Ttloadfromoracle (' Scott ', ' emp ', ' SELECT * from Scott.emp '); CREATE TABLE "SCOTT". " EMP "(" EMPNO "number (4,0) not NULL," ename "varchar2 (ten bytes)," JOB "varchar2 (9 byte)," MGR "number (4,0)," HireDate "date," S AL "Number (7,2)," COMM "number (7,2)," DEPTNO "number (2,0)) >create readonly Cache Group Cacheuser.empautorefresh interval 5 Seconds mode incrementalfrom scott.t1 (SID int not null primary key,sname VARCHAR2 (10)       );


Combat: Oracle TimesTen 11.2.2.7.0 on CentOS 6.5

Related Article

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.