Anda di halaman 1dari 35

PI SQL Data Access Server

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

PI SQL Data Access Server Administrator Guide


2009-2015 by OSIsoft, LLC. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or
by any means, mechanical, photocopying, recording, or otherwise, without the prior written permission
of OSIsoft, LLC.
OSIsoft, the OSIsoft logo and logotype, PI Analytics, PI ProcessBook, PI DataLink, ProcessPoint, PI Asset
Framework (PI AF), IT Monitor, MCN Health Monitor, PI System, PI ActiveView, PI ACE, PI AlarmView, PI
BatchView, PI Coresight, PI Data Services, PI Event Frames, PI Manual Logger, PI ProfileView, PI Web
API, PI WebParts, ProTRAQ, RLINK, RtAnalytics, RtBaseline, RtPortal, RtPM, RtReports and RtWebParts
are all trademarks of OSIsoft, LLC. All other trademarks or trade names used herein are the property of
their respective owners.
U.S. GOVERNMENT RIGHTS
Use, duplication or disclosure by the U.S. Government is subject to restrictions set forth in the OSIsoft,
LLC license agreement and as provided in DFARS 227.7202, DFARS 252.227-7013, FAR 12.212, FAR
52.227, as applicable. OSIsoft, LLC.
Version: 1.4
Published: 01-Oct-2015
Contents

PI SQL Data Access Server ..............................................................................................1


Contents ............................................................................................................................................................. 3

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

Using PI SQL Data Access Server................................................................................... 23


SQL implementation..........................................................................................................................................23
Message logging ............................................................................................................................................... 24

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

3rd Party Libraries ......................................................................................................... 33


Boost Library ..................................................................................................................................................... 33
ANTLR Library ................................................................................................................................................... 33

Technical support and other resources........................................................................... 34


Introduction
PI SQL Data Access Server (PI SQL DAS) is a middleware component that supports the PI SQL
family of drivers such as PI ODBC and PI JDBC. While these drivers implement a certain industry
standard or API and build the interface to 3rd party clients or applications PI SQL DAS is
responsible for executing the queries.

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:

PI OLEDB and PI OLEDB Enterprise


PI Integrator for Business Analytics

About OSIsoft PI Developer Technologies


PI Developer Technologies are designed to support implementation of custom applications on
top of the PI System, as well as integration of PI System data with other applications and
business systems such as Microsoft Office or SQL Server, Enterprise Resource Planning
systems (ERPs), Web portals, and maintenance systems, to name just a few.
PI Developer Technologies cover a wide range of use cases in various environments,
programming languages, operating systems, and infrastructures. Products include:

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)

4 PI SQL Data Access Server Administrator Guide


Licensing for PI Developer Technologies is divided into development and runtime licenses.
Developers and integrators obtain development licenses for most PI Developer Technologies
products through their individual membership to the PI Developer's Club: PI Developers Club
(https://pisquare.osisoft.com/community/developers-club). For details, see PI Developers
Club FAQ (https://pisquare.osisoft.com/docs/DOC-1101).
The PI System Access (PSA) runtime license enables end users to access PI System data,
including timeseries data in PI Data Archives and asset metadata in AF Servers, using any of PI
ODBC 2014 Administrator Guide 1 the PI Developer Technologies. For more information, see
OSIsoft website (http://www.osisoft.com) or contact OSIsoft Technical Support
(https://techsupport.osisoft.com/).

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.

PI SQL Data Access Server Administrator Guide 5


Introduction

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

Middleware deployment takes advantage of cross-architecture support; for example, when


using 64-bit query execution (in PI SQL DAS) from a 32-bit ODBC application.

6 PI SQL Data Access Server Administrator Guide


Installation
In this document we cover the installation of:
PI SQL Data Access Server
The setup kit is distributed as self-extracting executable file. It includes 32- and 64-bit versions.

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.

Topics in this section


System Requirements
Install PI SQL Data Access Server

System Requirements
PI SQL Data Access Server (PI SQL DAS) requirements depend on the installed feature.

The OLE DB Provider Host feature requires


PI OLEDB
PI OLEDB Enterprise

The PI Integrator Query Engine feature requires


PI AF Client
PI Integrator for Business Analytics

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.

Install PI SQL Data Access Server


Procedure
1. To install PI SQL Data Access Server, select either the standalone or middleware
deployment option.
See Deployment Options for information about standalone and middleware options.
2. Verify whether the computer you will use meets the minimum system requirements (see
System Requirements.
3. Run the PI SQL DAS setup kit (see PI SQL DAS).
PI SQL Data Access Server Administrator Guide 7
Installation

Run the PI SQL DAS Setup Kit


Before you start
The installation must be run from an account that has administrative privileges.

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.

2. Verify that the PI SQL Data Access Server Service is running.

8 PI SQL Data Access Server Administrator Guide


Installation

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:

PI SQL Data Access Server Administrator Guide 9


Installation

In the next dialog use the Modify option:

and add the missing feature:

Complete the installation and verify that the PI SQL Data Access Server Service is running.

10 PI SQL Data Access Server Administrator Guide


Installation

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.

PI SQL Data Access Server silent installation


The PI SQL DAS setup kit extracts several installation modules. The components of the
installation process, their order, and the arguments used to launch the components are
provided in a configuration file named setup.ini. You can modify setup.ini to provide
different command line arguments for different stages of the setup. This might be useful within
a well-controlled environment with options that are known in advance, such as when
performing an embedded installation. The setup kit also contains a file named silent.ini,
which contains modifications to setup.ini that are typically needed to run a silent
installation. You can augment these arguments by adding any of the options described in the
following table.

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.

Use the following syntax for a silent installation of a single component:


msiexec.exe /i pisqldas.msi REBOOT=Suppress ALLUSERS=1 /qn
msiexec.exe /i pisqldas64.msi REBOOT=Suppress ALLUSERS=1 /qn
PI SQL Data Access Server Administrator Guide 11
Installation

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.

PI SQL Data Access Server files


The list of installed files is provided in the release notes document PI SQL Data Access Server
Release Notes.pdf.

PI SQL Data Access Server installation results


Files are installed in the [PIHOME]\SQLDAS directory. Depending on selected features, the
following Windows services get registered with startup type Automatic, and started:
PI SQL Data Access Server (OLEDB)
PI SQL Data Access Server (PI Integrator)
The services are configured to run as the built-in Network Service account. It is
recommended that network administrators not change the service account.
It is possible to use a domain account instead of the service account, connections are then
limited to the HTTPS protocol.

12 PI SQL Data Access Server Administrator Guide


Installation

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.

PI SQL Data Access Server Administrator Guide 13


Installation

PI SQL DAS in a Double-Hop Scenario


A double-hop scenario is one in which a client application is on Computer 1, the middleware
(PI SQL DAS) is on Computer 2, and the resource that requires impersonated credentials (such
as the PI Server or PI AF Server) is stored on Computer 3.
To make this scenario work, PI ODBC and the PI JDBC Windows version use the Kerberos
protocol for authentication, but delegation must be enabled for the PI SQL Data Access Server.
Because PI SQL DAS uses the Network Service built-in windows account, you must enable
delegation for the machine itself. The setting is done on the domain controller by a domain
administrator.

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.

14 PI SQL Data Access Server Administrator Guide


Installation

Trusted connection and double-hop scenario


Because for a trusted connection, user authentication is done on the client but data needs to be
accessed on remote resources, it is important that the user account is not restricted regarding
delegation. If not sure, consult with your system administrator. The setting is configured in the
domain controller as shown below (option flag must be unchecked).

See also PI SQL DAS in a Double-Hop Scenario.


In the following situations Kerberos delegation may not be required:

PI SQL Data Access Server is on same computer as the PI driver


PI SQL Data Access Server is on same computer as the Data Source (PI Data Archive or PI AF
Server)
PI Trust is configured for PI SQL Data Access Server (all users are mapped to the same
credentials) Provider Type=PIOLEDB only.
HTTPS protocol is used

PI SQL Data Access Server Administrator Guide 15


Installation

Certificate for HTTPS communication


The PI SQL Data Access Server is automatically configured to use a SELF-SIGNED certificate,
bound to port 5461. If your IT policies allow working with SELF-SIGNED certificates then the
installation procedure is complete and you can skip the optional configuration of PI SQL Data
Access Server.

Configure PI SQL Data Access Server (optional)


PI SQL Data Access Server is a self-hosted Windows Communication Foundation (WCF) service
that uses HTTP transport and SSL/TLS security for explicit user login. As a result, a port is
bound with an X.509 certificate.
Secure Sockets Layer (SSL) uses certificates on the client and server to store encryption keys.
The server provides its SSL certificate when a connection is made so that the client can verify
the identity of the server. The server can also request a certificate from the client to provide
mutual authentication of both sides of the connection, but this mechanism is currently not
used for PI SQL DAS.
Certificates are stored in a centralized store according to the IP address and port number of
the connection. The special IP address 0.0.0.0 matches any IP address for the local machine.
You must have administrative privileges to modify the certificates stored on the computer.
If you are required to use enterprise-type security certificates, use the information here to
configure an enterprise certificate for PI SQL DAS and bind it to the port used by PI SQL DAS.

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.

16 PI SQL Data Access Server Administrator Guide


Installation

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

PI SQL Data Access Server Administrator Guide 17


Installation

Configure the SSL port


Port 5461 is used for PI SQL Data Access Server HTTPS communication.
The configuration tool (see page Configuration Tool) allows communication from any IP
address. You can use existing operating system tools to further restrict the port if desired. For
details, see the Microsoft Windows documentation about Netsh.exe at
http://msdn.microsoft.com/en-us/ library/bb736546(VS.85).aspx, or Windows integrated
firewall.
You may also have third-party Firewall or Virus Scanner tools that can restrict communication
through port 5461.

PI Server login through PI SQL DAS


For the PI Server login, OSIsoft recommends that you use Integrated Security (SSPI)
configuration. The PI SQL Data Access Server will log into the PI Server with the user
credentials of its client, that is, the PI driver connection.
The Windows user of the PI SQL DAS login must have a trust configured on the PI Server or
have a PI Server identity mapping configured on the PI Server (available in PI Server 3.4.380 or
later). See Configuring PI Server Security for details about how to configure trusts.
For example, use these properties to configure a trust for Windows user MyDomain\User1:
Trust Name: PISQLDAS
Network Path: pisqldas64
Domain: MyDomain
Account: User1

18 PI SQL Data Access Server Administrator Guide


Installation

To map a PI Server Identity for Windows user MyDomain\User1:


Name: User1Map
Windows Account: MyDomain\User1
Identity: piadmin

PI SQL Data Access Server Administrator Guide 19


Installation

In the PI driver, the authentication information is usually configured in the connection string.
For details, see the related product documentation.

20 PI SQL Data Access Server Administrator Guide


Installation

Remove PI SQL DAS

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.

PI SQL Data Access Server Administrator Guide 21


Installation

22 PI SQL Data Access Server Administrator Guide


Using PI ODBC

Using PI SQL Data Access Server


The topics in this section describe how to use PI ODBC, which includes: information about SQL,
Advanced ODBC topics, message logging, and a source code example. A description of PI SQL
Commander Lite is also provided.

Topics in this section


SQL implementation
Advanced ODBC topics
Message logging
Source code example
PI SQL Commander Lite
PI ODBC Driver Limitations

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.

PI documentation is available from Tech Support (http://techsupport.osisoft.com).

PI SQL Data Access Server Administrator Guide 23


Using PI ODBC

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.

Then Expand to either the OSIsoft-SQL-DataAccessServer Debug channel or OSIsoft-


SQL-IntegratorForBusinessAnalytics channel and use Enable Log.

24 PI SQL Data Access Server Administrator Guide


Using PI ODBC

Now all PI SQL Data Access Server activity will be logged. Use any ETW tool for analyzing
the trace events.

PI SQL Data Access Server Administrator Guide 25


Using PI ODBC

PI SQL Data Access Server Trace


PI SQL Data Access Server optionally allows to generate logging information. To enable this
feature add the following or similar section to the pisqldas64.exe.config file:

<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

PI Integrator Query Engine Feature


Logging information about PI Integrator query execution is stored into the PI SQL Data
Access Server trace (see above).

OLEDB Provider Host Feature


For connections of type PIOLEDB and PIOLEDBENT log mechanisms of the corresponding
providers can be used.
Refer to the PI OLEDB Provider User Manual and/or the PI OLEDB Enterprise User
Guide.

26 PI SQL Data Access Server Administrator Guide


Troubleshooting
To identify solutions when a PI driver does not connect or does not get data, OSIsoft
recommends that you troubleshoot from the ground up, and test components in the order they
are used:

PI SDK, check connectivity using About PI-SDK


PI OLEDB Enterprise, verify functionality using PI SQL Commander
PI OLEDB, verify functionality using PI OLEDB Tester
PI SQL Data Access Server, run PI SQL DAS interactively to verify functionality or use a
PI OLEDB query in the pilog..pisdklog table to check for PI SQL DAS error messages
PI driver, start with installation on same computer as PI SQL DAS
Refer to Connection Messages and Errors for more troubleshooting information.

Run PI SQL DAS Interactively


Procedure
1. To run PI SQL Data Access Server in interactive mode, start a command prompt:

Note:
By default, only explicit login can be used if PI SQL DAS runs interactively.

PI SQL Data Access Server Administrator Guide 27


Troubleshooting

Checklist for Troubleshooting a Trusted Connection in a Double-


Hop Scenario
Verify that the PI SQL Data Access Server runs as Service and uses the Network Service
account.
Verify that the PI SQL DAS machine account that is delegating the credentials is trusted
for delegation.
In Active Directory, verify that the Account is sensitive and cannot be delegated check box
is cleared for users who access the application.
Verify that the time stamp on the authenticator does not differ by more than five
minutes from the time stamp of the server.
Verify that TCP/UDP port 88 is not blocked by a firewall or a router. By default, Kerberos
authentication uses TCP/UDP port 88.
Verify that the HOST SPN is registered for the machine account. This is by default. (You can
check the existing set of SPNs for the machine account by running the following command:
Setspn.exe -L <myServer-NetBIOS-name>

Connection Messages and Errors


This topic contains common connection messages, including messages that indicate connection
problems and the corresponding error messages.
These messages are visible as output of the getSnap ODBC sample application. Other
applications might display messages in a message box or log file, depending on how those
applications handle exceptions.

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

Incorrect Username or password for connection to PI SQL DAS


[PI SQL DAS gSOAP Channel] HTTP Error
Details: HTTP/1.1 403 Forbidden

No SSPI configuration or incorrect username or password


[PISQLDAS] [PIOLEDB][PI SDK] Unable to open a session on a server.
The user name and password may be incorrect. Mypiserver

28 PI SQL Data Access Server Administrator Guide


Troubleshooting

Kerberos/Double-hop Issue, no delegation of user credentials


ERROR [08004] [PIODBC] [PIOLEDBENT] [OSIsoft.AFSDK]
Cannot connect to server 'myAFServer'.

Incorrect data source (server) name


[PISQLDAS] [PIOLEDB][PI SDK] The requested server was not found in
the known servers table. Unable to resolve name to IP address.
mypi3

or:
[PI SQL DAS] [PIOLEDBENT] PI System 'pisqldas63' is not registered.

Incorrect PI SQL DAS


ERROR [08004] [PIODBC]
System.ServiceModel.EndpointNotFoundException: Could not connect
to net.tcp://myPIServer:5462/DataAccessServer/Query. The
connection attempt lasted for a time span of 00:00:01.0156518. TCP
error code 10061: No connection could be made because the target
machine actively refused it 192.168.0.10:5462.

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).

Firewall does not allow inbound connection on PI SQL DAS side


[PI SQL DAS gSOAP Channel] A connection attempt failed because the
connected party did not properly respond after a period of time,
or established connection failed because connected host has failed
to respond.

SSL not configured (error appears after short timeout)


[PI SQL DAS gSOAP Channel] EOF was observed that violates
the protocol. The client probably provided invalid authentication
information.
Details: SSL connect failed in tcp_connect()

Certificate not suitable error (appears immediately)


[PI SQL DAS gSOAP Channel] EOF was observed that violates the
protocol. The client probably provided invalid authentication
information.
Details: SSL connect failed in tcp_connect()

PI SQL Data Access Server Administrator Guide 29


Troubleshooting

SSL Certificate binding error (appears immediately)

[PI SQL DAS gSOAP Channel] Error observed by underlying BIO:


Connection reset by peer
Details: SSL connect failed in tcp_connect()

Above error usually corresponds to an error in pisqldasAutoConfig.log as shown in the


following screen shot.

You may be able to fix the problem by running the configuration tool pisqldasAutoConfig.exe
from an administrative account with elevated privileges.

1. First remove the existing configuration by calling pisqldasAutoConfig.exe -r

C:\PIPC\SQLDAS>pisqldasAutoConfig.exe -r
SELF-SIGNED certificate : removed
Found existing reservation (5461, OLEDB) : deleted
Found existing reservation (5461, BI) : deleted

2. Generate new configuration by executing pisqldasAutoConfig.exe

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.

30 PI SQL Data Access Server Administrator Guide


No Data Tables visible for PI Integrator Connection
If you have installed the PI Integrator Query Engine feature but cannot see data tables on
the client then this may be due to some security issues, for example when the Database
Access Grant script built-in to the setup kit failed.
For access to tables that are stored in a SQL Server database, the SQL Server needs to be
configured to grant access to PI SQL DAS. This can be done as post install step using a
powershell script that is located under the following directory: [PIHOME]\PIPC\SQLDAS
and is called grantaccess.ps1
Copy this powershell script to your SQL Server machine and run the script in a powershell
administrative command window.

You can also manually perform the steps:


Create a Windows user group
Add the machine name of your PI SQL Data Access Server to this user group.
If you run PI SQL Data Access Server and SQL Server on the same machine then add
the Windows built in account Network Service instead.
Add the user group as a SQL Server login and add it to the db_datareader role of
your PI Integrator database

PI SQL Data Access Server Administrator Guide 31


Troubleshooting

32 PI SQL Data Access Server Administrator Guide


3rd Party Libraries

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.

PI SQL Data Access Server Administrator Guide 33


3rd Party Libraries

Technical support and other resources


For technical assistance, contact OSIsoft Technical Support at +1 510-297-5828 or through the
OSIsoft Tech Support Contact Us page (https://techsupport.osisoft.com/Contact-Us/). The
website offers additional contact options for customers outside of the United States.
When you contact OSIsoft Technical Support, be prepared to provide this information:
Product name, version, and build numbers
Details about your computer platform (CPU type, operating system, and version number)
Time that the difficulty started
Log files at that time
Details of any environment changes prior to the start of the issue
Summary of the issue, including any relevant log files during the time the issue occurred
To ask questions of others who use OSIsoft software, join the OSIsoft user community,
PI Square (https://pisquare.osisoft.com). Members of the community can request advice
and share ideas about the PI System. The PI Developers Club space within PI Square offers
resources to help you with the programming and integration of OSIsoft products.

34 PI SQL Data Access Server Administrator Guide


PI SQL Data Access Server Administrator Guide 35

Anda mungkin juga menyukai