cancel
Showing results for 
Search instead for 
Did you mean: 

HOW TO USE TAG QUERY IN SAP MII 12.2

former_member1231563
Participant
0 Kudos

Hey SAP experts,

I am using SAP MII 12.2 and want to implement something using TAG Query template.

My requirement is to query a SQL table using Tag query by passing a TAG NAME and DATETIMESTAMP as parameters to the TAG QUERY and then fetch some corresponding values from that eg quanityt,UOM etc.

Is it possible to implement it this way??

Please help me out on this one.

Thanks

Praveen.

Accepted Solutions (1)

Accepted Solutions (1)

former_member196557
Active Contributor
0 Kudos

Hi Praveen,

In order to do a SQL Query from MII 12.2, you either need to use a SQLQuery template that can connect to a defined MII DataServer that connects to a database, or a PCoQuery template that connects to an MII PCoConnector DataServer that is in turn connected to a PCo OleDb or ODBC Agent Instance. 

The MII TagQuery template is only for querying Tag data sources from a UDC DataServer (usually connected to PCo OPC, OPC HDA, or Historian Agent Instances).

Regards, Steve

Answers (2)

Answers (2)

Former Member
0 Kudos

You can use the simulator to make the desired scenarios and using them you can make your tag query. Once you are successful in doing this you need to replace the data source. Make sure the datsource must returns the proper tag.

Just an additional point to start and initially check the scenarios and make the decision on how to approach.

I hope it may be helpful.

Former Member
0 Kudos

Please check Simulator Data server is availble and enabled in your SAP MII.

If it is enabled means you can use tag query by selecting this simulator as data source.

Thanks,

Santhosh K

jcgood25
Active Contributor
0 Kudos

Depending upon what information you have in your database, you might want to look at using the Open Connector data server, which allows you to configure the queries behind the basic tag data server behaviors for TagList, Current, History, etc.  the benefit then becomes in it working like a standard tag query for the user, charts, etc.