如何增加和减少TimesTen的PermSize和TempSize
2016-04-03 16:29
330 查看
TimesTen的内存分配主要是PermSize和TempSize两块,在sys.odbc.ini中定义,并可通过dssize或ttconfiguration查看
TempSize的增加和减少比较简单,只需在DSN中修改数字,然后unload并load数据库即可。
PermSize的增加同上。
PermSize的减少相对复杂,例如我们在DSN定义中将
PermSize=512 改为 PermSize=256
在load数据库时,显示警告
Warning 6200: New value for permanent data partition size ignored since smaller than current value of 512 megabytes
PermSize仍保持不变
若你不需要其中的数据,你可以ttDestroy然后load数据库即可,若需要其中数据,则必须通过ttMigrate后,再ttDestroy,然后再load
前面我们看到PERM_IN_USE_SIZE为29M,因此缩小PermSize时,不能小于PERM_IN_USE_SIZE。以下为过程:
本文参考了:
HOWTO : Understand Modifying TimesTen PermSize And TempSize First Connect Database Attributes (Doc ID 1081008.1)
HOWTO : Decrease Database PermSize For An Existing TimesTen Database (Doc ID 1081032.1)
HOWTO : Understand Moving or Copying A TimesTen Database Using Backup Utilities (Doc ID 974583.1)
Command> dssize m; PERM_ALLOCATED_SIZE: 512 PERM_IN_USE_SIZE: 29.6396484375 PERM_IN_USE_HIGH_WATER: 63.2841796875 TEMP_ALLOCATED_SIZE: 128 TEMP_IN_USE_SIZE: 9.86328125 TEMP_IN_USE_HIGH_WATER: 116.28515625 Command> call ttconfiguration('permsize'); < PermSize, 512 > 1 row found. Command> call ttconfiguration('tempsize'); < TempSize, 128 > 1 row found.
TempSize的增加和减少比较简单,只需在DSN中修改数字,然后unload并load数据库即可。
PermSize的增加同上。
PermSize的减少相对复杂,例如我们在DSN定义中将
PermSize=512 改为 PermSize=256
在load数据库时,显示警告
Warning 6200: New value for permanent data partition size ignored since smaller than current value of 512 megabytes
PermSize仍保持不变
若你不需要其中的数据,你可以ttDestroy然后load数据库即可,若需要其中数据,则必须通过ttMigrate后,再ttDestroy,然后再load
前面我们看到PERM_IN_USE_SIZE为29M,因此缩小PermSize时,不能小于PERM_IN_USE_SIZE。以下为过程:
先修改DSN文件,将PermSize改小 然后使用ttMigrate备份 [oracle@localhost info]$ ttmigrate -c plsqldb plsqldb.ttm ttMigrate: Warning 01000: [TimesTen][TimesTen 11.2.2.2.0 ODBC Driver][TimesTen]TT6200: New value for permanent data partition size ignored since smaller than current value of 512 megabytes -- file "db.c", lineno 10126, procedure "sbDbConnect" (TimesTen error code = 6200). Saving user PUBLIC User successfully saved. Saving user PLS User successfully saved. Saving table PLS.EMP Saving rows... 14/14 rows saved. Table successfully saved. Saving table PLS.FOO Saving rows... 0/0 rows saved. Table successfully saved. Saving table PLS.TEMP Saving rows... 1/1 row saved. Table successfully saved. Saving sequence PLS.SBTEST_SEQ Sequence successfully saved. Saving PL/SQL package PLS.TEST PL/SQL package successfully saved. Saving PL/SQL package PLS.WORKLOAD PL/SQL package successfully saved. Saving PL/SQL package body PLS.TEST PL/SQL package body successfully saved. Saving PL/SQL package body PLS.WORKLOAD PL/SQL package body successfully saved. 删除数据库 [oracle@localhost info]$ ttdestroy plsqldb 恢复数据库 [oracle@localhost info]$ ttmigrate -r plsqldb plsqldb.ttm Restoring user PLS Restoring privileges... Privileges restored. User successfully restored. Restoring table PLS.EMP Restoring rows... 14/14 rows restored. Table successfully restored. Restoring table PLS.FOO Restoring rows... 0/0 rows restored. Table successfully restored. Restoring table PLS.TEMP Restoring rows... 1/1 row restored. Table successfully restored. Restoring sequence PLS.SBTEST_SEQ Sequence successfully restored. Restoring PL/SQL package PLS.TEST PL/SQL package successfully restored. Restoring PL/SQL package PLS.WORKLOAD PL/SQL package successfully restored. Restoring PL/SQL package body PLS.TEST PL/SQL package body successfully restored. Restoring PL/SQL package body PLS.WORKLOAD Note: PACKAGE BODY created with errors (matches saved object compile status) PL/SQL package body successfully restored. 验证PermSize以及缩小 [oracle@localhost info]$ ttisql plsqldb Copyright (c) 1996-2011, Oracle. All rights reserved. Type ? or "help" for help, type "exit" to quit ttIsql. connect "DSN=plsqldb"; Connection successful: DSN=plsqldb;UID=oracle;DataStore=/home/oracle/app/oracle/product/TimesTen/tt1122/info/DemoDataStore/plsqldb/plsqldb;DatabaseCharacterSet=AL32UTF8;ConnectionCharacterSet=US7ASCII;LogFileSize=32;DRIVER=/home/oracle/app/oracle/product/TimesTen/tt1122/lib/libtten.so;PermSize=256;TempSize=128;TypeMode=0;PLSQL_MEMORY_SIZE=16;PLSQL_MEMORY_ADDRESS=0x16000000;OracleNetServiceName=ttorcl;LogBufMB=32; (Default setting AutoCommit=1) Command> dssize m; PERM_ALLOCATED_SIZE: 256 PERM_IN_USE_SIZE: 6.94140625 PERM_IN_USE_HIGH_WATER: 6.94140625 TEMP_ALLOCATED_SIZE: 128 TEMP_IN_USE_SIZE: 5.71484375 TEMP_IN_USE_HIGH_WATER: 5.71484375 Command>
本文参考了:
HOWTO : Understand Modifying TimesTen PermSize And TempSize First Connect Database Attributes (Doc ID 1081008.1)
HOWTO : Decrease Database PermSize For An Existing TimesTen Database (Doc ID 1081032.1)
HOWTO : Understand Moving or Copying A TimesTen Database Using Backup Utilities (Doc ID 974583.1)
相关文章推荐
- JSR 303标准
- 桃花庵--程序员版
- BZOJ 2327: [HNOI2011]勾股定理
- 初学者教程:第一只爬虫——爬取招聘信息(二)
- [Unity热更新]tolua# & LuaFramework(四):读取数据
- java虚拟机HotSpot中的垃圾收集器
- Linux: xclip,pbcopy,xsel用法 terminal 复制粘帖 (mac , ubuntu)
- 118.最大全0子矩阵
- 第十三章 建造者模式
- 9. Smarty3:模版继承
- android设置 默认wifi
- 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B),win32 error 50
- 第五周学习进度表
- linux命令行下载jdk
- 数据库水平切分的实现原理解析——分库,分表,主从,集群,负载均衡器(转)
- 梳理caffe代码io(十三)
- DexIndexOverflowException两种情况的解决方法
- YD 督促训练 判断这年五一几天假期
- 最大连续和
- Android设计模式应用---适配器模式