sybase参数调整

 

Parameter Name                          Default              Memory Used   Config Value         Run Value                Unit                     Type
------------------------------   -----------         -----------      ------------         -----------       --------------------   ----------
procedure cache size                    3271                1116040            512000              512000              memory pages(2k)     dynamic

 

一、存储缓存不够

There is not enough procedure cache to run this procedure, trigger, or SQL batch. Retry later, or ask your SA to reconfigure SQL Server with more procedure cache.

sp_configure "max memory",200000 (设置为共享内存的75%)

sp_configure "procedure cache size",90000

查看:sp_configure "max memory"、sp_configure "procedure cache size"

修改:sp_configure "max memory",200000、sp_configure "procedure cache size",90000

 

二、数据库启动不了

sybase 12.5 配置了大内存后数据库无法启动

在安装目录下面,我的是C:\sybase,会有一个你相对于实例的配置文件,xx.cfg,我就是手犯贱在90000后面还加了一个零,虚拟机的内存都没有那么多,数据库怎么可能启动

 

 

 

三、其他相关配置

在xx.cfg配置文件中,对下述参数进行优化.(要根据你虚拟机分配的最大内存,或者服务器的最大内存而配置,不然配置大了,数据库就会启动不了)

(另如果数据库已经打开了,可以进入isql,则在islq>下输入下述语句就可以进行优化了.)

 

针对2g内存(redflag中为free -m  or top),多次测试后,最终参数为(数据库可以起来,不报错)
    max memory                  procedure cache size                        default data cache    
 262144     0.5g                            50m                                                    300m

 

--设置数据库能够使用的最大内存数,单位为2K,下面配置为2G1024*1024

sp_configure 'max memory',1048576

 

 --设置过程缓存,单位为2K,下面配置为200M100*1024

sp_configure 'procedure cache size',102400

 

 --设置数据库默认的数据缓存,一般为最大内存值的60%,针对2G内存,一般配置为1.2G

sp_cacheconfig 'default data cache','1200M'

 

 --设置数据库允许的最大用户连接数,下面配置为100

sp_configure 'number of user connections',100

 

 --设置数据库最大的锁数量,下面配置为50000

sp_configure 'number of locks',50000

 

 --设置数据库允许的最大设备数量,下面配置为100

sp_configure 'number of devices',100

 

 --让数据库在启动的时候一次性收集完所有内存

sp_configure 'allocate max shared memory','1'

 

 --设置数据库最大可使用的CPU数,下面配置为3

sp_configure 'max online engines',3

 

--设置在数据库启动时加载的CPU数,下面配置为3

sp_configure 'number of engines at startup',3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值