SQL 2005 镜像警报历史记录
我们在两个 SQL Server 2005 标准版本之间设置了镜像。 还有镜像警报设置如下: DB 镜像(镜像连接丢失) 数据库镜像(与主体的连接丢失) DB镜像(主体运行暴露) DB镜像(同步镜像) DB镜像(同步主体) 镜像提交开销超过阈值(MIRROR) 最早的未发送交易超过阈值(PRINCIPAL) 未恢复的日志超过阈值(MIRROR) 未发送的日志超出阈值(主要)
“最旧的未发送事务超出阈值”警报在过去几天内多次生成。但此警报并不是专门针对数据库的。这只是平均值。
我以为这些信息应该在一个表中,结果发现是msdb.dbo.dbm_monitor_data表。它保存诸如 log_flush_rate 、send_queue_size、send_rate、redo_queue_size、redo_rate、transaction_delay 和 transactions_per_sec 等数据以及数据库名称。然后我想知道这张表是如何填充的。为此,我发现 SQL Server 创建的镜像监控作业“数据库镜像监控作业”运行 sp sp_dbmmonitorupdate,它从镜像 perfmon 计数器填充此表。该作业每分钟运行一次。
例如,警报是在 11:23:52 生成的。 这些作业每分钟只运行一次,但它仍然设法在 11:23:00 和 11:23:52(生成警报时)捕获数据,每分钟两次。
我认为可能是,当生成警报时,它也会运行这个存储过程。如果它更新了表,那么我可以运行一个 select 语句。但我怎么能确定呢?
问题: 我怎样才能知道为什么这个表没有按计划更新?是什么触发了它的人口?有谁知道哪个表保存警报历史数据?
注意:没有运行重建索引作业,并且镜像阈值已设置为以下屏幕截图所示:
有人可以帮忙吗?
提前致谢
We have mirroring set up between 2 SQL Server 2005 standard editions.
There are also mirroring alerts set up as follows:
DB Mirroring (Connection with Mirror Lost)
DB Mirroring (Connection with Principal Lost)
DB Mirroring (Principal Running Exposed)
DB Mirroring (Synchronizing Mirror)
DB Mirroring (Synchronizing Principal)
Mirror commit overhead exceeds the threshold (MIRROR)
Oldest unsent transaction exceeds the threshold (PRINCIPAL)
Unrestored log exceeds the threshold (MIRROR)
Unsent log exceeds the threshold (PRINCIPAL)
"Oldest unsent transaction exceeds the threshold" alert was generated a lot of times in last coupld of days. But this alert wasn't specifically for a database. It was just average value.
I thought that this information should be in a table and I found that it was msdb.dbo.dbm_monitor_data table. It holds data like log_flush_rate ,send_queue_size,send_rate,redo_queue_size,redo_rate,transaction_delay and transactions_per_sec with database names. Then i wondered how is this table populated. For this i found that the mirroring monitoring job that SQL server creates "Database Mirroring Monitor Job" runs an sp sp_dbmmonitorupdate which populated this table from Mirroring perfmon counters. This job runs every minute.
The alert was generated for example at 11:23:52.
The jobs only runs once a minute, still it managed to capture data at 11:23:00 and then at 11:23:52 (when the alert was generated) that is twice in the minute.
I thought that may be, when the alert is generated, it also runs this stored procedure. If it updated the table, then I can just run a select statement. But how can I be sure?
Problem:
how can I find out why this table was updated without schedule? what triggered its population? Does anyone know which table holds alerts history data?
NOTE:No rebuild index jobs were running and the mirroring thresholds have been set as in the following screenshot:
Can anyone help please?
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案:sp_dbmmonitorupdate 会引发错误,进而引发警报并因此填充表。我深入研究了所有镜像存储过程和表来找到这一点。 :-)
Answer: sp_dbmmonitorupdate raises errors which in turn raises alerts and hence populates table. I digged in all mirroring stored procedures and tables to find this. :-)