I have used the PI-OLEDB driver to insert data into PI tags, however, is it possible to insert data into PI tags using an AF SQL connection and element/attribute?
We have a need to be able to enter data, and replies will determine the path forward.
Unfortunately, the PI OLEDB Enterprise which handles SQL connections to an AF server's elements, attributes, etc, is read only.
The PI OLEDB Provider is read/write, but that provider hits the PI Data Archive. So when you write to it, you'll be writing to a tag directly, and any attributes that have that tag configured for its pi point data reference will show the new value. Any other attribute type, such as static, will not be changeable in this manner.
In theory, you could nest queries using two different linked servers in SSMS, one that uses PI OLEDB Enterprise and returns the PI point names from the AF server's attribute configuration (Asset.ft_GetPiPoint), and then another that uses PI OLEDB Provider to hit a PI Data Archive linked server to takes that result and runs an update query. Then you wouldn't have to manually name the tags, but I also haven't tried to write such a query so I can't guarantee it's possible.
That's fine.. we don't know if we don't ask.
I will let the people writing the code they will have to use the actual tag name.
Retrieving data ...