Create the PI AF SQL Server database manually
- Last UpdatedOct 03, 2024
- 2 minute read
- PI System
- PI Server 2018
- PI Server
In some situations you may want to create the PI AF SQL Server database manually rather than by running the PI Server install kit. Some organizations prefer this approach because they want a database administrator to examine any SQL scripts and run them manually rather than trusting an installation program to create a SQL Server database.
To create the PI AF SQL Server database manually, you must run a batch file called GO.bat, which in turn executes some SQL Server scripts that create the PI AF SQL Server database. To obtain the necessary scripts, you can either:
-
Access the Customer Portal.
-
Run the PI Server install kit and select the AF SQL database scripts option but NOT select the AF SQL script execution. The install kit places GO.bat and the SQL Server scripts in the %PIHOME64%\AF\SQL folder.
Note: To run the necessary scripts from the command line, install the ODBC-based version of the sqlcmd utility. For information on the ODBC-based version of sqlcmd, see the Microsoft topic: sqlcmd Utility.
When you run the GO.bat batch file, it does not create any Windows local groups because those actions may require administrator privileges. Consequently, before you run GO.bat, you must perform a separate procedure to create Windows local groups.
One advantage of creating the PI AF SQL Server database manually by executing the GO.bat batch file is that you can specify the SQL Server instance and port number.
Note: Execution of the PI AF SQL scripts must occur from an account with sysadmin privileges for a new install of a SQL Server instance and db_owner privileges for an upgrade of the SQL Server instance.
After obtaining the PI AF SQL scripts, perform the following tasks to create the PI AF SQL Server database manually.