Remove NetworkService account access to the PI AF SQL Server database
- Last UpdatedFeb 14, 2025
- 2 minute read
- PI System
- PI Server 2018
- PI Server
Removal of NetworkService account access to the PI AF SQL Server database is only applicable for upgrades from older versions of PI AF. Beginning with PI AF 2.7 (2015), the PI AF Application Service is run under a virtual account, NT SERVICE\AFService, and this change is not required.
If you change the PI AF application service so that it does not run under the NetworkService account, you must remove the NetworkService account’s access to the PI AF SQL Server database (typically called PIFD).
-
On the PI AF SQL Server database computer, click Start > Administrative Tools > Computer Management.
-
Under Computer Management (Local), expand System Tools > Local Users and Groups > Groups.
-
In the list of groups, double-click AFServers.
-
Select the NetworkService account and click Remove.
-
Click OK and click Close.
-
Open SQL Server Management Studio and connect to the SQL Server instance in which the PIFD database resides.
-
Expand the PIFD database and navigate to the Security > Schemas folder.
-
Right-click the NT AUTHORITY\NetworkService schema and select Delete.
-
Click OK to remove the schema.
-
Under the SQL Server instance, expand the Security folder; then expand the Logins folder.
-
Right-click NT AUTHORITY\NetworkService and select Properties.
-
Select the User Mapping page.
-
Select the row for the PIFD database.
-
Clear the check box under Map for the PIFD database.
-
Click OK.
The user in the PIFD database is removed, and the login no longer has access to the PIFD database.