PI Nexus+ / Installation Guide
Set Up the Database
This chapter creates or prepares the PI Nexus+ database, applies its schema and saves the connection that PI Nexus+ uses.
Overview
This chapter creates or prepares the PI Nexus+ database, applies its schema and saves the connection that PI Nexus+ uses.
Database Setup opens when the installer finishes with Run PI Nexus+ Database Setup now ticked. Run it as the account from Prepare SQL Server: an account that may create databases and logins, or a db_owner of a database the SQL administrator prepared. If it did not open, run C:\Program Files\Software Athlete\PI Nexus+\Admin\Setup-Database.bat as that account.

- Enter SQL Server, the instance that hosts the database.
- Enter the Database name, or press Enter for
PINexus. - Enter the PI Nexus+ service account, for example
DOMAIN\svc-pinexus. - At the second-account prompt, press Enter. Enter an account only when the web application and the scanner service run as different accounts.
- Wait for PI Nexus+ database setup completed.
Database Setup creates the database if needed, turns on snapshot isolation, creates the login and database user for each account and adds them to db_owner. It then applies the schema migrations, writes bootstrap.json to C:\ProgramData\Software Athlete\PI Nexus+ and starts the PI Nexus+ Scanner service if it is installed on this server. You can run it again safely; it only adds what is missing.
If a SQL administrator prepared the database, the window reports that it cannot create SQL logins and assumes the login exists. If the login is missing, the step stops at Granting database permissions; ask the SQL administrator to run Prepare-Database.sql first.
Note: If the window warns that snapshot isolation could not be turned on, setup still completes, but pages can stall while scans write. Ask a SQL administrator to run the statement shown, in a maintenance window.
To script Database Setup, run Setup-Database.ps1 from the same folder with -SqlServer, -Database and -ServiceAccount. The parameters are listed under Setup-Database.ps1 in the Reference.
Reference: Installer and Script Parameters
