设为首页 加入收藏

TOP

Oracle内存数据库Timesten的使用(1)(一)
2015-11-21 01:56:48 来源: 作者: 【 】 浏览:0
Tags:Oracle 内存 数据库 Timesten 使用

Timesten安装


开发环境信息
192.168.57.80 /opt/timesten/TimesTen
Daemon pid 12239 port 53396 instance ttgjds
TimesTen server pid 12248 started on port 53397

数据库">启动和停止Timesten数据库

启动Timesten

[root@bogon bin]# ttDaemonAdmin -start
TimesTen Daemon startup OK.
[root@bogon bin]# ttDaemonAdmin -force -start

停止Timesten

[root@bogon bin]# ttDaemonAdmin -stop TimesTen Daemon stopped.

重启Timesten

[timesten@bogon info]$ ttDaemonAdmin -restart TimesTen Daemon stopped. TimesTen Daemon startup OK.

查看Timesten的状态

[root@bogon bin]# ttstatus TimesTen status report as of Thu Jul 30 14:35:00 2015 Daemon pid 13029 port 53396 instance ttgjds TimesTen server pid 13038 started on port 53397 ------------------------------------------------------------------------ Data store /opt/timesten/TimesTen/ttgjds/info/DemoDataStore/test_1122 There are no connections to the data store Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. ------------------------------------------------------------------------ Data store /opt/timesten/ttdata/database/gjds There are no connections to the data store Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. ------------------------------------------------------------------------ Data store /opt/timesten/TimesTen/ttgjds/info/DemoDataStore/sampledb_1122 There are no connections to the data store Replication policy : Manual Cache Agent policy : Manual PL/SQL enabled. ------------------------------------------------------------------------ Accessible by group timesten End of report

创建内存数据库

timesten采用ODBC方式连接数据库,比如创建一个名为cachedb_gjds的数据库

#首先打开配置文件 vi $TIMESTEN_HOME/info/sys.odbc.ini

在[ODBC Data Sources]中添加cachedb_gjds=TimesTen 11.2.2 Client Driver,如下所示

[ODBC Data Sources] TT_1122=TimesTen 11.2.2 Driver sampledb_1122=TimesTen 11.2.2 Driver cachedb1_1122=TimesTen 11.2.2 Driver repdb1_1122=TimesTen 11.2.2 Driver repdb2_1122=TimesTen 11.2.2 Driver sampledbCS_1122=TimesTen 11.2.2 Client Driver cachedb1CS_1122=TimesTen 11.2.2 Client Driver repdb1CS_1122=TimesTen 11.2.2 Client Driver repdb2CS_1122=TimesTen 11.2.2 Client Driver cachedb_gjds=TimesTen 11.2.2 Client Driver

然后添加下面的内容

#中括号中是DSN名称 [cachedb_gjds] Driver=/opt/oracle/TimesTen/tt1122/lib/libtten.so #ds路径cachedb_gjds不能是一个文件夹 DataStore=/opt/oracle/TimesTen/ttdata/gjds/cachedb_gjds #内存大小 PermSize=40 #临时空间一般是PermSize/4 TempSize=32 #是否允许PLSQL连接 PLSQL=1 #数据库字符集,注意这里要与Oracle一致 DatabaseCharacterSet=ZHS16GBK #连接的字符集 ConnectionCharacterSet=ZHS16GBK #Oracle TNS名称 OracleNetServiceName=orcl

Timesten基本使用

1、连接Timesten,Timesten默认是不需要用户名和密码的
使用ttisql DSN_NAME或者ttisql “DSN=DSN_NAME;[attributes…]”

[timesten@bogon info]$ ttisql cachedb_gjds Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=cachedb_gjds"; Connection successful: DSN=cachedb_gjds;UID=timesten;DataStore=/opt/oracle/TimesTen/ttdata/gjds/cachedb_gjds;DatabaseCharacterSet=ZHS16GBK;ConnectionCharacterSet=ZHS16GBK;DRIVER=/opt/oracle/TimesTen/tt1122/lib/libtten.so;PermSize=40;TempSize=32;TypeMode=0;OracleNetServiceName=ORCL; (Default setting AutoCommit=1) Command>

2、创建用户

#Timesten创建用户与Oracle一致 Command> create user gjds identified by gjds; User created. Command> grant conne
首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇ogg12c测试oracle11.2.0.4同步 下一篇oracle日志文件位置

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: