Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找任何可能存在的 sql 查询,以便能够确认镜像的运行状况,即工作或失败。此外,如果有查询,您可以在其中查看当前积压。
首先十分感谢。
以下代码将获取镜像的所有详细信息:
EXEC sp_dbmmonitorresults [数据库名称],[Lat x hours results],[不更新数据库的状态]
例子:
使用 msdb; EXEC sp_dbmmonitorresults AdventureWorks2012, 2, 0;
此代码获取最近 2 小时的详细信息。