监控 SQL 1.监控事例的等待: select event,sum(decode(wait_time,0,0,1)) prev, sum(decode(wait_time,0,1,0)) curr,count(*) from v$session_wait group by event order by 4; 2.回滚段的争用情况: select name,waits,gets,waits/gets ratio from v$rollstat a,v$rollname b where a.us
Oracle常用管理SQL 监控 SQL 1.监控事例的等待: select event,sum(decode(wait_time,0,0,1)) prev, sum(decode(wait_time,0,1,0)) curr,count(*) from v$session_wait group by event order by 4;
SQL Server数据库的服务(SQL Server (MSSQLSERVER)、SQL Server Agent (MSSQLSERVER)等服务)一般配置成自动启动,但是有时候有些服务组件也会突然停止。有些是因为异常或Bug,有些是因为配置缘故、有些是因为非规范操作(例如重启SQL Server (MSSQLSERVER)时关闭了SQL Server Agnt服务,但是没有检查或重启这个服务)。那么监控SQL Server的服务状态也是数据库监控里面的一项常规工作。
以前我们用Solarw