使用SQL 链接Historian 服务配置方法

使用SQL 链接Historian 服务配置方法

1、 如图所示勾选”Allow inprocess”;

使用SQL 链接Historian 服务配置方法

2、 新建一个”Linked Server”, 如下图所示输入相关信息;

使用SQL 链接Historian 服务配置方法

3、 接上图,点击选择”Security”,按下图所示输入Historian 用户名及密码;

使用SQL 链接Historian 服务配置方法

4、 链接成功后,如下图所示,可展开看到Historian 的表;

使用SQL 链接Historian 服务配置方法

5、 SQL 查询语句

查询指定标签最后10 个值:
|SELECT * FROM OPENQUERY
(iHist ,‘set starttime=now
select timestamp,value,quality from ihrawdata
where
samplingmode=rawbynumber and numberofsamples=10 and direction=backwards
and tagname=Liang-PC.Simulation00001’)|

查询所有标签名:
| SELECT * FROM OPENQUERY
(iHist ,‘select * from ihtags’)|

相关文章:

  • 2021-12-05
  • 2021-12-05
  • 2022-12-23
  • 2021-12-05
  • 2021-08-22
  • 2021-09-17
  • 2021-12-05
  • 2021-12-05
猜你喜欢
  • 2021-12-05
  • 2021-12-05
  • 2021-09-11
  • 2021-09-24
  • 2021-07-17
  • 2021-06-15
  • 2022-12-23
相关资源
相似解决方案