TimesTen学习笔记4timesten 中个各种命令.docx
《TimesTen学习笔记4timesten 中个各种命令.docx》由会员分享,可在线阅读,更多相关《TimesTen学习笔记4timesten 中个各种命令.docx(6页珍藏版)》请在冰豆网上搜索。
TimesTen学习笔记4timesten中个各种命令
TimesTen学习笔记4(timesten中个各种命令)
TimesTen学习笔记4(timesten中个各种命令)
1.ttAdmin(命令)
功能:
指定内存加载策略
指定replicationagent策略
启动或停止cacheagent
如:
[timesten@rh44server~]$ttadmin-querytt_eservice;
RAmResidencepolicy:
inuse
ReplicationAgentpolicy:
manual
Replicationmanuallystarted:
False
cacheAgentpolicy:
manual
cacheAgentmanuallystarted:
False
[timesten@rh44server~]$ttadmin-rampolicyalwaystt_eservice;
RAmResidencepolicy:
always
ReplicationAgentpolicy:
manual
Replicationmanuallystarted:
False
cacheAgentpolicy:
manual
cacheAgentmanuallystarted:
False
[timesten@rh44server~]$ttadmin-cachepolicyalwaystt_eservice;
2.ttDaemonAdmin(命令)
功能:
启动/停止TimesTenmaindaemon,serverandwebserver.
语法:
ttDaemonAdmin[-force]{-start|-stop|-restart}
ttDaemonAdmin-startserver
ttDaemonAdmin[-force]-stopserver
ttDaemonAdmin[-startwebserver|-stopwebserver]
3.ttbackup(命令)
功能:
备份datastore。
例如:
[timesten@rh44server~]$ttbackup-typefilefullenable-dir/home/timesten/-fnamelogzhoutt_eservice;
backupstarted...
backupcomplete
恢复
ttRestore-dir/home/timesten/-fnamelogzhourestoredDsn;
备到带库
ttbackup-typestreamFulltt_eservice|ddbs=64kof=/dev/rmt0
4.ttbulkcp(命令)
功能:
在内存表和文件之间转换数据。
两种模式:
•Incopy-inmode,rowsarecopiedintoanexistingTimesTentablefromoneormoreAscIIfiles(orstdin).
•Incopy-outmode,anentireTimesTentableiscopiedtoasingleAscIIoutputfile(orstdout).
例如:
[timesten@rh44server~]$ttbulkcp-odsn=tt_eservicetracelogtracelog.dump
1/1rowcopied
5.ttblockinfo(存储过程)
功能:
显示perm内存中block的利用信息和碎片信息。
用法:
cALLttblockInfo;
6.ttbookmark(存储过程)
功能:
显示日志文件信息。
用法:
callttbookmark;
7.ttcachepolicyset(存储过程)
功能:
指定cacheagent的策略。
用法:
callttcachepolicyset('always');
8.ttcachepropagateFlagset
功能:
允许临时停止把更新推向oracledb
用法:
callttcachepropagateFlagset(0);该标志在每次事务提交或回滚段后都被重置,所以如果需要关闭的话,要将autocommit设为0.
如果设为1的话,则update会推向oracle。
9.ttcachestart/ttcachestop
功能:
启动/关闭cacheagent
用法:
callttcachestart();
10.ttckpt
功能:
手动做non-blockingcheckpoint
用法:
cALLttckpt();
cALLttckpt(1,10);
11.ttckptblocking
功能:
手动做一个blockingcheckpoint
用法:
callttckptblocking();
callttckptblocking(1,10);
12.ttckptconfig
功能:
设置后台checkpoint的频率,速率
用法:
callttckptconfig(ckptFrequency,ckptLogVolume,ckptRate)
13.ttcompact
功能:
整合perm和temp内存的碎片,类似于oracle里面的coalescs。
用法:
cALLttcompact;
14.ttconfiguration
功能:
查询参数设定。
用法:
callttconfiguration();
15.ttDatastorestatus
功能:
查看datastore的状态。
用法:
callttdatastorestatus('/home/timesten/TimesTen/eservice/info/TT_eservice');
16.ttLockLevel
功能:
设置locklevel.
用法:
callttLockLevel(lockLevel);
lockLevel取值为Row和Ds
17.ttLogbufprint
功能:
查看logbuffer里面的内容
用法:
ttLogbufprint(verbose,maxLen)
cALLttLogbufprint(1,0);
cALLttLogbufprint(2,0);
18.ttoptclearstats
功能:
清除表格上面的统计信息。
用法:
ttoptclearstats(tblname,invalidate)
invalidate取0(no)or1(yes).0表示即使清掉了统计信息后,也不会影响现有的command。
19.ttoptestimatestats
功能:
收集表格上面的统计信息。
用法:
ttoptestimatestats(tblname,invalidate,samplestr)
其中samplestr取值为'nRows’或‘ppeRcenT’,
20.ttRepDeactivate
功能:
将active状态的datastore改为activestandby状态
用法:
cALLttRepDeactivate();
21.ttRepstart/ttRepstop
功能:
启动/关闭replicationagent.
22.ttRepstateget()
功能:
获取datastore的状态
用法:
cALLttRepstateget();
23.ttRepstateset
功能:
将activestandby状态的datastore改为Active状态,即master。
用法:
cALLttRepstateset('AcTIVe');
24.ttsize
功能:
预估表格的大小
用法:
ttsize(tblname,nRows,frac)
其中nRows表示预估表格会有多少条记录。
frac表示预估表中varbinary或varchar类型字段的碎片,该参数可选。
如:
command>callttsize('tracelog',10000000,null);
25.ttDestory(命令)
功能:
删除一个datastore,包括checkpoint文件,logfile。
用它能够安全完整地删除datastore.
语法:
ttDestroy[[-wait][-timeoutsecs]][-force]{-connstrconnection_string|Dsn|dspath}
26.ttmodinstall(命令)
功能:
修改端口或者enable/disableaccesscontrol.
语法:
ttmodinstall-portportnumber
ttmodinstall-enableAccesscontrol
ttmodinstall-changeoraclesettings
27.ttuser(命令)
功能:
输入一个密码,产生加密密码。
语法:
ttuser-pwdcrypt
28.ttstatus(命令)
功能:
显示datastore的状态
29.ttschema(命令)
功能:
打印出对象的ddl语句
语法:
ttschema[-l][-c][-list{all|tables|views|sequences|cachegroups|repschemas}[,...]]
[-st|-systemTables][-uTT_instance][-connstrconnection_string|Dsn][[owner.]name][...]
30.ttRepAdmin(命令)
功能:
显示replicatioin的定义,监控replication的状态