Connect to an AVEVA Historian database located on-premises
- Last UpdatedOct 22, 2026
- 3 minute read
Use the Historian dialog to save Trend worksheet history to an AVEVA Historian database located on-premises. The project runtime connects to Studio Database Gateway, and the gateway connects to AVEVA Historian.
Note: The gateway is compatible with AVEVA Historian 2023 or later.
If you run more than one gateway, see Manually run Studio Database Gateway.
Before you begin
-
Use AVEVA Historian 2023 or later.
-
Make sure the gateway computer can resolve the Historian server name and ping it.
-
Allow TCP port 32565, or the port configured in Historian, from the gateway computer to the Historian server.
-
Trust the Historian server certificate on the gateway computer. See Trust the AVEVA Historian server certificate.
-
Choose specific credentials or gateway credentials. See Configure Historian authentication.
-
The Historian account must belong to the Historian group aaAdministrators or aaPowerUsers to store data.
To connect to AVEVA Historian:
-
Open the Trend worksheet, select Historian in History Format, and click Historian Configuration. The Historian dialog is displayed.

-
In Server, enter the host name or IP address of the Historian server, optionally followed by a colon and the port, for example HISTORIAN01:32565. If you omit the port, port 32565 is used. If you changed the Historian TCP port in the Historian Configurator, enter the same port here. Use a name that is in the Subject Alternative Name list of the Historian certificate. An IP address is converted to the name returned by the DNS lookup, and that name must also be in the list. This box accepts string expressions.
-
Select the credentials.
Use Specific User Name and Password: enter DOMAIN\user for a domain account or HISTORIAN_HOST\user for a local account on the Historian computer. .\user is accepted only when AVEVA Edge and Historian are on the same computer. Clear AVEVA Historian Integrated Security in the gateway.
Use Gateway Credentials: the gateway uses the Windows account that runs it. Select AVEVA Historian Integrated Security in the gateway.
For more information, see Configure Historian authentication.
-
In User Name and Password, enter the account (both boxes accept tags only).
Tip: When gateway credentials are used and Historian is on another computer, the account that runs the gateway must be known to the Historian server (same domain, or an identical account on both computers) and must be a member of a Historian group.
-
In Prefix, optionally enter a prefix. The tag is stored in Historian as <Prefix>.<tag>.
-
To keep data when the gateway or Historian is not available, select Enable Store and Forward. The gateway also keeps its own files in C:\ProgramData\ArchestrA\Historian\StoreForward\<server>\. The gateway account needs write access to this folder. The runtime limits are MaxNumberOfFiles, MaxNumberOfFilesPolicy and MaxRecordsPerFile in the [Trend-Historian] section of Program Settings.ini (Windows runtime defaults: 100, RemoveFirst, 1279) or of the project .APP file (IoT View defaults: 100, DiscardNew, 1000000).
-
In Status, optionally enter a tag that receives the connection status. In the Windows runtime the values are: 0 = failed or not connected, 1 = connected, 2 = connected and store-and-forward synchronization running. In IoT View the values are "1" = OK and "2" = error.
-
In Reload, optionally enter a tag. When its value changes, the runtime evaluates the string expressions again and reconnects.
-
In the Gateway group, enter the Host and Port of Studio Database Gateway. The defaults are 127.0.0.1 and 3997. Host accepts string expressions. Port is a fixed number. Only 127.0.0.1 or localhost makes the runtime start and stop the gateway. For any other value, including the real name or IP address of the same computer, start the gateway yourself.
-
To protect the connection between the runtime and the gateway, select Enable Secure Channel. This protects the connection between the runtime and the gateway. It does not change how the gateway connects to Historian. The gateway connects to Historian with the certificate that the Historian server provides.
-
Click OK to close the dialog.
A gateway started by the runtime runs under the Windows account of the runtime.
In the Windows runtime, Server, User Name, Password, Prefix and Host accept tag expressions in curly brackets. A change takes effect after the Reload tag changes. IoT View does not evaluate them.