今天开发的兄弟告诉我,一个应用,在公司作测试的时候,每秒能向数据库中插入数据200条,在生产系统的小型机上,也只有这个速度,为了看看到底系统在干吗,我就在公司的服务器上安装了MDA表,希望能看看Sybase的性能到底慢在那里.
在Sybase上安装MDA表的步骤如下:
首先配置cis参数为1
sp_configure ‘enable cis’, 1
go
其次,在servers中增加一个loopback服务,其实也就是指向自己的一个服务了
use master
go
sp_addserver loopback, null, @@servername
go
可以使用下面的语句来测试这个服务是否配置正确
set cis_rpc_handling on
go
这个如果返回是0,或者是执行正确,就表示刚才的配置正确了.
当然,也可以通过下面的方法来测试
exec loopback…sp_who
go
下面就是安装了,这一步非常重要:
isql -U sa -P yourpassword -S YOURSERVER
-i $SYBASE/$SYBASE_ASE/scripts/installmontables
看看屏幕的输出,如果有错误,就要想办法去排除了.
现在,得授予sa一个mon_role的权限了
use master
go
grant role mon_role to sa
go
用下面的语句来测试授权是否成功
select * from master..monState
go
这里返回正常的话,就可以继续下面的操作了
将下面的动态参数进行修改
sp_configure “enable monitoring”, 1
go
sp_configure “sql text pipe active”, 1
go
sp_configure “sql text pipe max messages”, 100
go
sp_configure “plan text pipe active”, 1
go
sp_configure “plan text pipe max messages”, 100
go
sp_configure “statement pipe active”, 1
go
sp_configure “statement pipe max messages”, 100
go
sp_configure “errorlog pipe active”, 1
go
sp_configure “errorlog pipe max messages”, 100
go
sp_configure “deadlock pipe active”, 1
go
sp_configure “deadlock pipe max messages”, 100
go
sp_configure “wait event timing”, 1
go
sp_configure “process wait events”, 1
go
sp_configure “object lockwait timing”, 1
go
sp_configure “SQL batch capture”, 1
go
sp_configure “statement statistics active”, 1
go
sp_configure “per object statistics active”, 1
go
然后,需要修改一个静态参数
sp_configure “max SQL text monitored”, 2048
go
现在,你要作的就是重新启动Sybase数据库服务器,然后你就可以使用MDA表来监测Sybase数据库的系统性能了.
具体如何使用MDA表,可以参考这里.
Write a comment
You need tologin.
