Verify the PI SQL Client installation
- Last UpdatedJun 22, 2023
- 2 minute read
- PI System
- PI SQL Client ODBC 2021
- Developer
PI SQL Client includes the iPiSql command-line tool. You can use either tool to validate a successful installation. For information about how to validate your installation with PI SQL Commander Lite, see PI SQL Commander Lite.
The iPiSql command-line tool is located in the Tools directory of the PI SQL Client installation. iPiSql works with raw connection strings. For more information, see Connection string format.
-
Open a Windows PowerShell command window as an administrator.
Note: If you cannot open Windows PowerShell as an administrator, use PI SQL Commander Lite to validate the installation. See PI SQL Commander Lite for details.
-
Use cd or set-location to change to the following directory: 'PIHOME\SQL\SQL Client\ODBC\Tools'.
Note: Use single quotes (') around the directory path to allow for spaces in the folder names.
-
Type and press Enter.
You can specify the connection string when you call the tool as follows:
PS PIHOME\SQL\SQL Client\ODBC\Tools> .\iPiSql.ps1 -connectionString "Driver=PI SQL Client;
AF Server=myAfServer; AF Database=myAfDatabase; Integrated Security=SSPI;" -
If you did not specify the connection string, enter the following parameters:
-
PI Asset Framework Server Name
-
PI Asset Framework Database Name
-
If the installation was successful, you should see results similar to the following:
Connected to PI SQL Data Access Server (RTQP Engine) 2018 SP3 Patch 3, 1.8.21196.1
Driver name: PI SQL Client, version: 4.2.22020.1.
Item: AF SDK Version: 2.10.9.593 FriendlyVersion: 2018 SP3 Patch 3
Item: AF Server Version: 2.10.9.593 FriendlyVersion: 2018 SP3 Patch 3
Item: Master Catalog Version: 2 FriendlyVersion: null
Item: Model Schema Version: 3 FriendlyVersion: null
Item: Operating System Version: 6.2.9200.0 FriendlyVersion: Microsoft Windows 10
Enterprise
Item: Query Processor Version: 1.8.21196.1 FriendlyVersion: 2018 SP3 Patch 3
Item: SQL Server Version: 15.0.2080.9 FriendlyVersion: Microsoft SQL Server
2019 (RTM-GDR) (KB4583458) - 15.0.2080.9 (X64)
Note: Installation of PI SQL Data Access Server (RTQP Engine) requires you to connect to the PI SQL Client. For more information, see the PI SQL Data Access Server (RTQP Engine) Administrator Guide.
If PI SQL Data Access Server (RTQP Engine) is not installed or the PI AF Server machine is not accessible, you should see an error similar to the following:
C:\Program Files\PIPC\SQL\SQL Client\odbc\tools\iPiSql.ps1 : Exception calling "Open" with "0" argument(s): "ERROR
[08001] None of the protocols could be used to establish a connection using Windows Integrated Security.
[08004] Communication error with https://FRA2-AF210AC:5464/RTQP/Query occurred.
Could not connect to the server.
[08004] Could not connect to net.tcp://fra2-af210ac:5465/RTQP/Query. The connection attempt lasted for a time span of
00:00:01.0224491. TCP error code 10061: No connection could be made because the target machine actively refused it
10.65.3.234:5465.
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [08004] Communication error with https://FRA2-AF210AC:5464/RTQP/Query occurred.
Could not connect to the server.
ERROR [08004] Could not connect to net.tcp://fra2-af210ac:5465/RTQP/Query. The connection attempt lasted for a time
span of 00:00:01.0224491. TCP error code 10061: No connection could be made because the target machine actively
refused it 10.65.3.234:5465.