Modify the AF Application Service connect string
- Last UpdatedOct 02, 2024
- 1 minute read
- PI System
- PI Server 2018
- PI Server
The install kit attempts to configure the connection string so that the PI AF Application Service can connect to the PI AF SQL Server Database. However, in some scenarios, this connection string needs to be altered. Such scenarios are discussed in the following procedure.
-
In Windows Explorer, navigate to the %PIHOME64%\AF folder on the PI AF Application Service computer.
-
Use a text editor to open the PI AF Application Service configuration file, AFService.exe.config.
-
Enter the name of the remote SQL Server, and the named instance if applicable, in the connect string server.
The following displays a sample connect string syntax:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="connectString" value="Persist Security Info=False;Integrated Security=SSPI;
server=<SQLName>[\SQLInstance];database=<PIFD>;Application Name=AF Application Server;"/>
<add key="streamedPort" value="5459"/>If your SQL Server is running on a cluster, you can use the IP address or the computer name of the clustered resource.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="connectString" value="Persist Security Info=False;Integrated Security=SSPI;server=<SQLClusterName>[\SQLInstance];database=<PIFD>;Application Name=AF Application Server;"/>
<add key="streamedPort" value="5459"/>If your SQL Server is configured to use SQL Server mirroring, then add after the , as shown in the following lines of code:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="connectString" value="Persist Security Info=False;Integrated Security=SSPI;
server=<SQLName>[\SQLInstance];failover partner=<SQLServerName>[\SQLInstance];database=<PIFD>;Application Name=AF Application Server;"/>
<add key="streamedPort" value="5459"/>You can modify attributes for the connect string, such as enabling encrypted communication. See the SQL Server Native Client Microsoft documentation for other options.
-
If the PI AF Application Service is running, stop and restart it for your changes to take effect.