05.29.06

如何在Sybase数据库中安装MDA表?

Posted in Sybase at 1:31 pm by David.Guo

今天开发的兄弟告诉我,一个应用,在公司作测试的时候,每秒能向数据库中插入数据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表,可以参考这里.

 

05.22.06

Weblogic的license,奇怪的东西

Posted in 其他内容 at 6:30 pm by David.Guo

05.18.06

天津出差第32天之孤立无援

Posted in David.Guo的心情随笔 at 11:23 pm by David.Guo

05.08.06

天津出差第23天之屋漏偏逢连阴雨

Posted in David.Guo的心情随笔 at 11:26 pm by David.Guo

05.06.06

天津出差第21天之weblogic’s license

Posted in David.Guo的心情随笔 at 4:44 pm by David.Guo

« Previous entries ·