我想用SQL查询Runtime.Events视图。我尝试了以下方法:
select * from Runtime.dbo.Events
出现以下错误:
OLE DB provider "INSQL" for linked server "INSQL" returned message "Event History no longer supports queries that do not provide time".
select * from Runtime.dbo.Events where EventTime >= '2018-09-01 00:00:00' and EventTime <= '2018-11-01 00:00:00'
给出了此非描述性错误:
Cannot execute the query "..." against OLE DB provider "INSQL" for linked server "INSQL".
日期格式似乎是正确的,因为当我尝试使用其他格式时,出现错误,指出错误的日期格式。
如何查询此视图?
答案 0 :(得分:0)
也许您正在尝试查询以下事件:
SELECT TOP 1000 *
FROM [A2ALMDB].[dbo].[v_EventHistory]
或这些事件:
SELECT * FROM Runtime.dbo.EventHistory
WHERE DateTime >= '2018-10-11'
答案 1 :(得分:0)
由于声誉欠佳,我无法通过评论来澄清这一点,所以让我发布答案。可能是您的警报和事件在A2ALMDB数据库中。如果是这种情况,请尝试以下查询。
SELECT * FROM [A2ALMDB].[dbo].Events WHERE [EventStamp] between '2018-09-01 00:00:00' AND '2018-11-01 00:00:00'