首页 > Linux操作系统 > Linux操作系统 > sybase优化概述(zt)
/************************MDA表**********************/
在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", 5120
go
现在,你要作的就是重新启动Sybase数据库服务器,然后你就可以使用MDA表来监测Sybase数据库的系统性能
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/756652/viewspace-242419/ ,如需转载,请注明出处,否则将追究法律责任。