修改Sybase数据库最大连接数

Sybase数据库默认最大连接数为25,当连接数不够用的情况下,需要修改数据库配置。

(1)sa登录数据库

C:/Documents and Settings/Administrator>isql -Usa -Ptest01 -Stest01     /*用户名,密码,服务名*/

 

(2)修改连接数为200,提示'max memory'值不够大

1> sp_configure "number of user connections",200
2> go
Msg 5861, Level 16, State 2:
Server 'TEST01', Procedure 'sp_configure', Line 695:
The current 'max memory' value '33792', is not sufficient to change the
parameter 'number of user connections' to '200'. 'max memory' should be greater
than 'total logical memory' '35522' required for the configuration.
(return status = 1)

 

(3)根据失败提示信息,修改'max memory'为需要的值
1> sp_configure  'max memory',35522
2> go
 Parameter Name                 Default     Memory Used Config Value
         Run Value   Unit                 Type
 ------------------------------ ----------- ----------- ------------
         ----------- -------------------- ----------
 max memory                           33792       71044       35522
               35522 memory pages(2k)     dynamic

(1 row affected)
Configuration option changed. The SQL Server need not be rebooted since the
option is dynamic.
Changing the value of 'max memory' to '35522' increases the amount of memory ASE

uses by 6 K.
(return status = 0)

 

(4)重新修改连接数,成功
1> sp_configure "number of user connections",200
2> go
 Parameter Name                 Default     Memory Used Config Value
         Run Value   Unit                 Type
 ------------------------------ ----------- ----------- ------------
         ----------- -------------------- ----------
 number of user connections              25       18186         200
                 200 number               dynamic

(1 row affected)
Configuration option changed. The SQL Server need not be rebooted since the
option is dynamic.
Changing the value of 'number of user connections' to '200' increases the amount

of memory ASE uses by 24426 K.
(return status = 0)

 

附:Sybase中查看当前连接情况

C:/Documents and Settings/Administrator>isql -Usa -Ptest01 -Stest01
1> sp_who
2> go

可以查看当前有哪些用户连接到sybase

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值