Administrator Guide
OSIsoft, LLC
777 Davis St., Suite 250
San Leandro, CA 94577 USA
Tel: (01) 510-297-5800
Fax: (01) 510-357-8136
Web: http://www.osisoft.com
Introduction ................................................................................................................. 4
In this Guide ........................................................................................................................................................ 4
About OSIsoft PI Developer Technologies ........................................................................................................... 4
Architecture ........................................................................................................................................................ 5
Deployment Options ........................................................................................................................................... 5
Installation ....................................................................................................................7
System Requirements ..........................................................................................................................................7
Install PI SQL Data Access Server .........................................................................................................................7
Run the PI SQL DAS Setup Kit ......................................................................................................................... 8
PI SQL Data Access Server silent installation .................................................................................................. 11
PI SQL Data Access Server files ......................................................................................................................12
PI SQL Data Access Server installation results ................................................................................................12
PI SQL DAS in a Double-Hop Scenario ...........................................................................................................14
Trusted connection and double-hop scenario ..................................................................................................... 15
Certificate for HTTPS communication ........................................................................................................... 16
Configure PI SQL Data Access Server (optional) ............................................................................................ 16
Configuration Tool ........................................................................................................................................ 16
Configure the SSL port ...................................................................................................................................18
PI Server login through PI SQL DAS ...............................................................................................................18
Remove PI SQL DAS ......................................................................................................................................21
Troubleshooting .......................................................................................................... 27
Run PI SQL DAS Interactively .............................................................................................................................27
Checklist for Troubleshooting a Trusted Connection in a Double- Hop Scenario ................................................ 28
Connection Messages and Errors ...................................................................................................................... 28
No Data Tables visible for PI Integrator Connection ....................................................................................... 31
This version of PI SQL Data Access Server supports connections and queries for:
PI Data Archive
PI AF Server
PI Integrator for Business Analytics
PI ODBC Driver and PI JDBC Driver are members of the PI Data Access product suite (see About
the OSIsoft PI Data Access Suite for more information).
In this Guide
This guide includes the procedures to install and configure PI SQL Data Access Server on
Windows operating systems. It also provides information about its querying capabilities and
outlines the details of the SQL language being supported.
Users of this guide should be familiar with:
SQL-based data access (PI OLEDB Provider, PI OLEDB Enterprise, PI JDBC Driver,
PI ODBC Driver)
Service-oriented architecture (PI Web API)
Programmatic access (PI SDK and AF SDK)
Architecture
The family of SQL based drivers has been re-architected to leverage the PI SQL Data Access
Server for query execution. This allows reducing the software being installed on the client to a
thin driver that has no local dependency on bigger components such as a query engine and PI
SDK or AF SDK. Currently this architecture applies to PI ODBC and PI JDBC.
The new driver architecture employs multiple optional query engines, such as the PI OLEDB
Enterprise and PI OLEDB query engines as well as the PI Integrator for Business Analytics
query engine.
PI SQL Data Access Server provides secure network communication through net.tcp or
HTTPS to the driver on the client side.
Deployment Options
PI drivers can be deployed in various combinations. Driver and PI SQL DAS can run on different
architectures (32-bit or 64-bit).
The resulting combinations can be categorized as standalone and middleware scenarios.
Note:
For best performance, OSIsoft recommends that you use 64-bit operating systems
whenever possible.
Multiple standalone and middleware configurations can be used as needed. This is useful if
performance of one application should not be influenced by queries of another one.
Standalone Deployment
Use the standalone deployment if a single application must be supported with maximum
performance.
Middleware Deployment
Note:
The PI Integrator for Business Analytics querying feature is only installed by the
version of PI SQL Data Access Server that is integrated into the PI Integrator setup
kit and is only available as 64-bit version.
System Requirements
PI SQL Data Access Server (PI SQL DAS) requirements depend on the installed feature.
The required products have additional dependencies (e.g. Microsoft .NET Framework, PI SDK,
AF SDK) that are documented in the related product documentation.
For additional information about the specific PI driver release you are using, see the product
release notes. The release notes also describe the minimum version requirements when
sharing PI SQL Data Access Server across clients.
Procedure
1. Run the setup kit: pisqldas_<version>_.exe, where <version> is the current version
string.
Note:
The installation of 32-bit and 64-bit versions of PI SQL DAS on the same machine is
not supported. When you run the installation on a 64-bit Windows operating system,
the 64-bit version of PI SQL DAS is selected automatically.
If you see PI SQL Data Access Server (OLEDB) running then the basic installation is
completed.
If you see PI SQL Data Access Server (PI Integrator) instead that means that the PI SQL Data
Access Server was already installed with only the PI Integrator Query Engine feature. In this
case open the Control Panel and use the Change option:
Complete the installation and verify that the PI SQL Data Access Server Service is running.
Note:
The PI Integrator Query Engine feature gets installed as part of the PI Integrator for
Business Analytics installation. If the OLEDB Provider Host feature was already
installed then the PI Integrator Query Engine feature needs to be enabled in the same
way (via Control Panel) as post install step.
Individual arguments must not contain spaces unless they are surrounded by quotes.
Argument Description
/i Specifies an installation
/qn Specifies "quiet mode" and suppresses dialog
boxes and prompts
ALLUSER Specifies the per-machine or per-user installation
context. Specify a value of 1 for silent installations.
REBOOT Restarts the computer. Specify a value of
Suppress for silent installations.
Note:
To run the complete package in silent mode, replace the setup.ini file with
silent.ini and run Setup.exe
or run
Setup -f silent.ini from a command prompt.
The PI SQL Data Access Server uses the following ports for communication with the specific
driver:
Port Description
5461 https end point, used for secure SSL/TLS
communication with explicit login
5462 net.tcp end point, used for communication with
trusted connection and explicit login
You may have third-party Firewall or Virus Scanner tools that can restrict communication
through these ports. Make sure these ports are accessible.
Note:
A double-hop can occur only if Trusted Connection (TRUSTED CONNECTION=YES) is
specified for the client connection or a Domain user account is provided. This is
because the original authentication occurs on the client.
If the driver uses the HTTPS protocol, the credentials are sent to the PI SQL DAS and
authentication occurs there, which is one fewer hop.
Configuration Tool
Use the pisqldasAutoConfig.exe configuration tool for all basic configurations of PI SQL DAS.
The tool is located in the [PIHOME]\SQLDAS directory, where [PIHOME] is your PIPC
installation directory.
If your IT policies require that you use enterprise type certificates, you can use the tool to
configure an enterprise certificate for PI SQL DAS and bind it to the port used by PI SQL DAS.
Procedure
1. In a command prompt, run the tool with parameter -e. For example: C:\PIPC
\SQLDAS>pisqldasAutoConfig.exe -e
2. Optionally, select a certificate from the Certificates dialog. The Intended Purposes column
must include at least Client Authentication and Server Authentication:
Note:
Enterprise certificates are typically already installed on your computer if it is part of a
domain. You should see your organization's name in the Issued by column. The
certificate named PISQLDAS is the SELF-SIGNED certificate used by default.
3. Click OK.
4. This output indicates that the selected certificate has been bound to the SSL port:
C:\PIPC\SQLDAS>pisqldasAutoConfig.exe -e
Found existing binding ......deleted
Create new SSL binding ......OK
Updating config file ......OK
In this example, the tool has configured the selected certificate to be used by PI SQL DAS
and bound this certificate to IP address/port 0.0.0.0:5461.
5. Restart the PI SQL Data Access Server service to use the new configuration
In the PI driver, the authentication information is usually configured in the connection string.
For details, see the related product documentation.
To remove the PI SQL Data Access Server, use Windows Control Panel or re-run the setup kit.
The Remove option automatically stops and deletes the PI SQL Data Access Server service
and uninstalls all files:
The SELF-SIGNED certificate and the SSL port binding are removed when PI SQL DAS is
uninstalled.
SQL implementation
A PI driver delegates all SQL commands via PI SQL Data Access Server to the underlying query
engine.
Provider Type=PIOLEDBENT
When connected to the PI Asset Framework (AF) Server, the built-in query engine of
PIOLEDB Enterprise is used. Please refer to the PI OLEDB Enterprise User Guide for
supported SQL syntax.
Provider Type=PIOLEDB
When connected to a PI Server, the built-in query engine of PIOLEDB is used. Refer to
the PI OLEDB Provider User Manual for supported SQL syntax.
PI Integrator
When connected to a PI Integrator database, the built-in PI Integrator Query Engine is
used. Refer to the PI Integrator for Business Analytics documentation for supported
SQL syntax.
Message logging
Function Tracing via Event Tracing for Windows (ETW)
To use this mechanism, launch Windows Event Viewer and enable Show Analytic and Debug
Logs.
Now all PI SQL Data Access Server activity will be logged. Use any ETW tool for analyzing
the trace events.
<system.diagnostics>
<trace autoflush="true">
<listeners>
<clear/>
<!-- Debug output -->
<add name="Default" type="System.Diagnostics.DefaultTraceListener"/>
<!-- Event log (logs only errors) -->
<add name="EventLog" type="System.Diagnostics.EventLogTraceListener"
initializeData="PI SQL DAS">
<filter type="System.Diagnostics.EventTypeFilter" initializeData="Error" />
</add>
<!-- Text file-->
<add name="TextFile" type="System.Diagnostics.TextWriterTraceListener"
traceOutputOptions="DateTime" initializeData="C:\Temp\PI_SQL_DAS.log"/>
</listeners>
</trace>
</system.diagnostics>
Note:
You can also direct output to other locations such as the Windows Event Log or the
Console. For configuration details see How to: Create and Initialize Trace Listeners
at https://msdn.microsoft.com/en-us/library/sk36c28t(v=vs.110).aspx
Note:
By default, only explicit login can be used if PI SQL DAS runs interactively.
Successful Connection
PI ODBC Driver connected to:
PI SQL DataAccessServer 01.03.0254 using PIOLEDB
PI : 3.4.390.18
PIOLEDB : 3.3.1.2
PISDK : 1.4.2.445
or:
PI ODBC Driver connected to:
PI SQL DataAccessServer 01.03.0254 using PIOLEDBENT
PI OLEDB Enterprise : 1.3.1.5
AF SDK : 2.5.1.5159
AF Server : 2.5.0.5039
AF Backend Database : 2.5.0.5039
or:
[PI SQL DAS] [PIOLEDBENT] PI System 'pisqldas63' is not registered.
or:
ERROR [08004] [PIODBC] [PI SQL DAS gSOAP Channel] No connection
could be made because the target machine actively refused it.
Details: connect failed in tcp_connect()
Note:
This error message also occurs when the PI SQL DAS port is linked by rules, such as those
implemented by McAfee software (port 5461 or 5462 blocked by access rule).
You may be able to fix the problem by running the configuration tool pisqldasAutoConfig.exe
from an administrative account with elevated privileges.
C:\PIPC\SQLDAS>pisqldasAutoConfig.exe -r
SELF-SIGNED certificate : removed
Found existing reservation (5461, OLEDB) : deleted
Found existing reservation (5461, BI) : deleted
C:\Program Files\PIPC\SQLDAS>pisqldasautoconfig.exe
SELF-SIGNED certificate : created
Create new SSL binding : OK
URL Namespace reservation (5461, OLEDB) : OK
URL Namespace reservation (5461, BI) : OK
Updating config file pisqldas64.exe : OK
Updating config file pisqldas64.piintegrator.exe : OK
See also paragraph Configuration Tool if you require using enterprise certificates.
Boost Library
PI SQL Data Access Server includes the Boost libraries.
http://www.boost.org/
ANTLR Library
PI SQL Data Access Server includes the ANTLR library.
http://www.antlr.org/
Please see the PI SQL Data Access Server Release Notes for the location of the license and copyright
information documents.