ITPUB??ì3
ITPUB论坛 » 内存数据库 » 求助:TimesTen的ReadOnly CacheGroup的问题

标题: 求助:TimesTen的ReadOnly CacheGroup的问题
离线 towerjt
初级会员



精华贴数 0
个人空间 0
技术积分 14 (66807)
社区积分 0 (55380)
注册日期 2002-5-20
论坛徽章:0
      
      

发表于 2008-4-28 17:20 
求助:TimesTen的ReadOnly CacheGroup的问题

在oracle中直接指定字段为primary key,建立read only cache group是能成功的,timesten的文档中基本都是这个例子
oracle:

SQL> create table test_jt ( id number(9) primary key, birth date);

Table created


TimesTen(v7):
Command> CREATE READONLY CACHE GROUP test_jt_mem
> AUTOREFRESH INTERVAL 5 SECONDS
> FROM test_jt
> (
> id number(9) primary key,
> birth date
> );

但是在实际生产中,经常是单独建立unique index,但是在这种情况下,建立readonly cache group失败
oracle :
SQL> create table test_jt (id number(9), birth date);

Table created

SQL>  create unique index test_jt_id_idx on test_jt(id);

Index created

TimesTen(v7):
Command> CREATE READONLY CACHE GROUP test_jt_mem
> AUTOREFRESH INTERVAL 5 SECONDS
> FROM test_jt
> (
> id number(9),
> birth date);
8213: Cache group tables must have a primary key.
The command failed.

Command> CREATE READONLY CACHE GROUP test_jt_mem
> AUTOREFRESH INTERVAL 5 SECONDS
> FROM test_jt
> (
> id number(9) primary key,
> birth date
> );
5120: No matching unique index or unique/primary key constraint on table BILLING.TEST_JT, cache operations are restricted
5168: Restricted cache groups are deprecated
5126: A system managed cache group cannot contain non-standard column type mapping
The command failed.

请问高手,应该怎么操作啊,谢谢


只看该作者    顶部
离线 towerjt
初级会员



精华贴数 0
个人空间 0
技术积分 14 (66807)
社区积分 0 (55380)
注册日期 2002-5-20
论坛徽章:0
      
      

发表于 2008-4-29 23:16 
搞定了,需要把建索引的字段显示声明为NOT NULL


只看该作者    顶部
离线 jidongzheng
资深会员



精华贴数 0
个人空间 0
技术积分 1564 (1054)
社区积分 110 (3200)
注册日期 2004-12-12
论坛徽章:5
会员2007贡献徽章BLOG每日发帖之星ITPUB新首页上线纪念徽章生肖徽章:羊生肖徽章:马 
      

发表于 2008-5-4 16:29 
是的.我今天也在测试.直接按照oracle的文档,就可以了.


__________________
QQ:417670179
MSN:jidongzheng@sohu.com
email:zhengjidong@wri.com.cn
只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问