0% found this document useful (0 votes)
5 views

FactoryTalk Historian SE - How To Configure A Linked Server With PI OLEDB or PI OLEDB Enterprise

Uploaded by

Sharad Adelkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

FactoryTalk Historian SE - How To Configure A Linked Server With PI OLEDB or PI OLEDB Enterprise

Uploaded by

Sharad Adelkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

11/27/24, 2:00 PM FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB Enterprise

ID: QA8140 | Access Levels: TechConnect

FactoryTalk Historian SE: How to configure a linked server


with PI OLEDB or PI OLEDB Enterprise

Document ID QA8140

Published Date 10/25/2024

Summary
FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB
Enterprise

Question
How do I replicate FactoryTalk Historian SE data in Microsoft SQL Server?

Why does the PI OLEDB Linked Server hang when executing a query?

Environment
FactoryTalk Historian Site Edition (SE)

PI OLEDB Provider

PI OLEDB Enterprise

Answer
Using SQL Server’s linked server feature and either QA54766 - FactoryTalk Historian SE
and the OSIsoft PI OLEDB Providers For a configuration procedure, refer to the
attachment.

Related Answers
QA29736 - FactoryTalk Historian SE: PI OLEDB linked server archive table

1. Install the PI OLEDB Provider on the SQL Server computer. The PI OLEDB provider is
not part of the default FactoryTalk Historian SE installation. It must be installed
separately.
To install the PI OLEDB Provider, run Setup.exe from:
<InstallDrive>:\Historian\Redist\Advanced Server
Options\PIDASSetup\OLEDB Provider.
2. Verify that a trust exists for the SQL Server computer. (SQL Server must use a trusted
connection to connect to the FactoryTalk Historian SE server).
If the computer hosting the SQL Server belongs to the same FactoryTalk network
directory as the computer hosting the FactoryTalk Historian SE server, you do
not need to create a trust for the SQL Server computer. The connection to the
FactoryTalk Historian SE server will be made using the credentials of the logged
on FactoryTalk user.
If the computer hosting the SQL Server does not belong to the same FactoryTalk
network directory as the computer hosting the FactoryTalk Historian SE server,
you must create a trust for the SQL Server computer. This can be done in the
Historian System Management Tools (SMT) using the Security > Trusts plug-in.

https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/52642 1/7
11/27/24, 2:00 PM FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB Enterprise

3. Establish a connection to the FactoryTalk Historian SE server.

Configure the OLEDB Provider


1. Open SQL Server Management Studio (SSMS) and expand Server Objects > Linked
Servers > Providers
2. Right-click PIOLEDB and click Properties. (Note: Options affect all linked servers
using the provider)

3. Use the following table to help determine which provider options to Enable

Provider Option Recommended Description

Allows parameterized queries with


Dynamic parameters Yes
the SQL placeholder '?'
Allows nested SELECT statements
Nested queries Yes
in the FROM clause
Only base level OLEDB interfaces
are invoked against the provider.
Level Zero only No
Do not check because we support
more than base level interfaces
OLEDB provider is instantiated
Allow inprocess Yes and run in the SQL Server's
memory space.
If set, SQL Server allows updates,
even if the ITransactionLocal
Non transacted updates No interface is not available. Do not
check because we do implement
the ITransactionLocal interface
If set, SQL Server attempts to use
Index as access path No indexes of the provider to fetch
data (not supported)
If set, SQL Server does not allow
executing pass-through queries
Disallow adhoc access No
against the OLEDB provider (can
be checked)
Indicates whether LIKE keyword is
Support 'Like' operator Yes supported - queries using LIKE
can be very expensive

https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/52642 2/7
11/27/24, 2:00 PM FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB Enterprise

Configure the Linked Server


1. Open SSMS and expand Server Objects
2. Right-click Linked Servers and click New Linked Server.

3. General page
Use the following table to determine settings.
Property Recommended Description
Name for the linked server being
Linked Server LINKEDPI
created
The OLEDB provider for the
Provider PI OLEDB Provider linked server. In this case "PI
OLEDB Provider"
Product name of the OLEDB data
Product name PIOLEDB source - unimportant but
shouldn't be blank
Data source <PI Server> Name of PI Data Archive
Provider string Integrated Security=SSPI Initializes OLE DB Provider-
specific properties.

[Required] in order to
use Windows Integrated
Security (Kerberos) :
Integrated Security=SSPI

Note: The property "Integrated


Security=SSPI" will force the
connection to use the
Authentication Procedure as
specified by the Protocol Order
in PI SDK Utility > Connections >
Options. When Windows
Security is configured as the
first Protocol, it will be
attempted first. This is the
recommended configuration.
The user's security context is
passed to the PI Data Archive,
that will check if the user can be
authenticated through a PI
Mapping. If the user cannot
authenticate to the PI Data
Archive using Windows Security,
the next protocol specified in the
https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/52642 3/7
11/27/24, 2:00 PM FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB Enterprise
Protocol Order (if any) will be
attempted. The "Security page"
section of this article contains
further configuration and
information regarding Windows
Authentication.

Note 2: If using this linked server


to perform DML queries, the
provider option "Always Return
Rowset = True;" will be
necessary.
Default catalog to use if a
catalog is not specified in the
Catalog piarchive
query, see manual for more
details.

4. Security page
Recommended setting: Be made using the login's current security context.
This setting uses the Authentication Procedure according to the Protocol
Order configured via the PI SDK Utility --> Connections --> Options.
Windows Security is the recommended option: the connection uses
Kerberos and the connected user's security context is delegated to the PI
Data Archive. The connection may fall back to using PI Trusts or Explicit
Login (with a Default User) depending on the configured Protocol Order and
PI Data Archive security settings.
When using SQL Server Authentication, the identity of the account running
the SQL Server service will be used for all Windows Authentication
connections to PI. The default account NT Service\MSSQLSERVER will
use the local machine credentials and will appear as <Domain>\
<Machine>$ (e.g. SD\SDSQL$). The double-hop scenario and Kerberos

https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/52642 4/7
11/27/24, 2:00 PM FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB Enterprise

delegation is no longer a concern.

Alternative/additional security settings


Only allow specific users access to the linked server
1. Click Add
2. Under Local Login, select the appropriate SQL Server login (could be
based on Windows or SQL authentication), Check the box Impersonate

3. Check Not be made


Legacy security configuration using Explicit Login with a PI User is
possible, but not recommended. If you have questions regarding such a
setup, contact Tech Support so that we can show you the advantages of
using a more secure option instead.
5. Server Options page
Use the following table to set properties.

Property Recommended Description

If true, SQL Server assumes all


characters in the linked server
are compatible with the local
server and sends comparisons
Collation Compatible True
directly to the OLEDB provider
If false, SQL Server will evaluate
comparisons on characters
locally
Limits connection attempt to
linked server
Value in seconds
Connection Timeout 30
If 0, defaults to remote query
timeout option for the SQL
Server
Query Timeout 600 Limits total execution time of a
query
Value in seconds

https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/52642 5/7
11/27/24, 2:00 PM FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB Enterprise

Property Recommended Description


If 0, defaults to query wait option
for the SQL Server

Verify Linked Server Functionality


1. Open SQL Server Management Studio

2. In a New Query window, execute one of the following queries replacing


<LinkedServerName> as appropriate:

PI OLEDB Provider

SELECT * FROM OPENQUERY(<LinkedServerName>,' SELECT tag, time, value FROM

3. Alternatively, use Pi Tester to execute queries and find samples:

Run %pihome%\OLEDB\Tools\PI OLEDB Tester\PIOLEDBTester.exe


Connect to the server.
In the window labeled SQL Statements, enter a query.

Attachments

File
KB01143 - How to configure a linked server with PI OLEDB or PI OLEDB Enterprise.mht

Recently Viewed

https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/52642 6/7
11/27/24, 2:00 PM FactoryTalk Historian SE: How to configure a linked server with PI OLEDB or PI OLEDB Enterprise

FactoryTalk Historian SE:


FactoryTalk Historian SE: FAQ: FactoryTalk Historian SE
Anonymous Connections via the
Interfacing with Other Systems Advanced Server Option
APIs or SDKs

DISCLAIMER
This knowledge base web site is intended to provide general technical information on a particular subject or subjects and is not an exhaustive treatment
of such subjects. Accordingly, the information in this web site is not intended to constitute application, design, software or other professional engineering
advice or services. Before making any decision or taking any action, which might affect your equipment, you should consult a qualified professional
advisor.

ROCKWELL AUTOMATION DOES NOT WARRANT THE COMPLETENESS, TIMELINESS OR ACCURACY OF ANY OF THE DATA CONTAINED IN
THIS WEB SITE AND MAY MAKE CHANGES THERETO AT ANY TIME IN ITS SOLE DISCRETION WITHOUT NOTICE. FURTHER, ALL
INFORMATION CONVEYED HEREBY IS PROVIDED TO USERS "AS IS." IN NO EVENT SHALL ROCKWELL BE LIABLE FOR ANY DAMAGES OF
ANY KIND INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS PROFIT OR DAMAGE, EVEN IF ROCKWELL AUTOMATION
HAVE BEEN ADVISED ON THE POSSIBILITY OF SUCH DAMAGES.

ROCKWELL AUTOMATION DISCLAIMS ALL WARRANTIES WHETHER EXPRESSED OR IMPLIED IN RESPECT OF THE INFORMATION
(INCLUDING SOFTWARE) PROVIDED HEREBY, INCLUDING THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY, AND NON-INFRINGEMENT. Note that certain jurisdictions do not countenance the exclusion of implied warranties; thus, this
disclaimer may not apply to you.

https://rockwellautomation.custhelp.com/app/answers/answer_view/a_id/52642 7/7

You might also like