Solution: PI JDBC Driver Configuration

Document created by kduffy on Sep 26, 2018Last modified by kduffy on Jul 2, 2019
Version 5Show Document
  • View in full screen mode

This document contains the answers to the Exercise: PI JDBC Driver Configuration.

 

The answers are very similar to the Exercise: PI OLEDB Provider Configuration and Exercise: PI OLEDB Enterprise Configuration since the PI JDBC Driver uses those query engines, and therefore uses the same OLEDB parameters. The important part of this exercise was to learn where to add these parameters using the URL format provided on page 19/20 of the user guide:

  • For PI OLEDB Enterprise connections: jdbc:pioledbent://<pisqldas_server>/<pioledbent_connectionstring>
  • For PI OLEDB Provider connections: jdbc:pioledb://<pisqldas_server>/<pioledb_connectionstring>

Note: in the JDBC URL, "pioledbent" can be replaced with "pi", and "pioledb" can be replaced with "pisql". These are legacy aliases from PI JDBC Driver 2012 and earlier that still work but were updated to be less ambigious.

 

 

1. A Windows application routing through a PI SQL DAS named PISQLDAS01 using exlicit login, connecting to a PI Data Archive named "PISRV01" using explicit login. The PI user is "OledbUsers" and the password is "5q1i5|=v|\|"; the domain username is "DomainOledbUsers" and password "5q1i5|=v|\|".

answer: jdbc:pioledb://PISQLDAS01 /Data Source=PISRV01;Password=5q1i5|=v|\|;User ID=OledbUsers;

 

From the PI OLEDB Provider manual we see this:

 

2. A Windows application routing through a PI SQL DAS named PISQLDAS01, connecting to a PI AF Server named "AFSRV01" using Windows explicit login. The Windows domain username is "OledbUsers" and password is "5q1i5|=v|\|".

answer: jdbc:pioledbent://PISQLDAS01 /Data Source=AFSRV01;Password=5q1i5|=v|\|;User ID=OledbUsers;

 

From the PI OLEDB Enterprise manual we see this:

 

3. A Windows application routing through a PI SQL DAS named PISQLDAS02, connecting to a PI Data Archive named "PISRV02" passing the user's context from start to finish via SSPI, disabling asynchronous PISDK calls.

answer: jdbc:pioledb://PISQLDAS01 /Data Source=PISRV01;Integrated Security=SSPI;Sync Calls=True;

 

From the PI OLEDB Provider manual we see this:

 

4. A Windows application routing through a PI SQL DAS named PISQLDAS02, connecting to a PI AF Server named "AFSRV02" passing the user's context from start to finish via SSPI, and when an error message is encountered for a value, it's embedded into that cell in the result set instead of erroring the query.

answer: jdbc:pioledbent://PISQLDAS01 /Data Source=AFSRV01;Integrated Security=SSPI;Embed Errors=True;

 

 

From the PI OLEDB Enterprise manual we see these:

 

As a final note: this exercise left out some of the scenarios seen in the PI OLEDB Provider, PI OLEDB Enterprise, and PI ODBC Driver exercises due to some limitations of the PI JDBC Driver (namely log file, time zone, net.tcp connections, and stateful connections). For a list of the limitation of the PI JDBC Driver, see the user guide pages 32-33.

Attachments

    Outcomes