您的位置:首页 > 数据库

修改Sybase数据库最大连接数

2011-06-16 11:36 323 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: