Elyse SQL SERVER AND DATABASE SETUP
OVERVIEW
This document covers the complete SQL Server and database setup for Elyse. The minimum required edition is SQL Server Express (free); any higher edition (Standard, Enterprise, Developer) will also work.
- SQL Server installation (Express or higher)
- FILESTREAM configuration
- TCP/IP protocol and port assignment
- Database restore from backup
- SQL Server login and permissions for the Elyse AD group
Prerequisites from previous steps (SERVER deployments):
- Active Directory configured per Domain Setup
- Service account
svc_sqlcreated in AD - Security group
Elyse_Userscreated in AD
After completing this document:
- SERVER deployments: Proceed to KCD Configuration.
- WORKGROUP deployments: Skip KCD and proceed to Backend Installation (Workgroup).
PREREQUISITES
- Windows Server 2016 or later (domain-joined) — or Windows 10/11 for WORKGROUP deployments
- Domain service account
svc_sqlcreated (see Domain Setup) — SERVER only - AD security group
Elyse_Userscreated (see Domain Setup) — SERVER only - SQL Server 2022 installer media available (Express edition or higher)
- SQL Server Management Studio (SSMS) installer available — use the latest version if the server has internet access; for offline servers, use SSMS 19.x (see Step 2)
- Elyse database backup file (
Elyse_DB_*.zip) available - Administrator access to the SQL Server host
STEP 1: INSTALL SQL SERVER
Elyse requires SQL Server 2022 or later. The minimum edition is SQL Server Express (free); any higher edition (Standard, Enterprise, Developer) will also work. The instructions below use Express as the example.
If the target server does not have internet access, download the Express Advanced media on a machine that does and transfer it to the server (see Domain in a Box for details on offline installation).
Run the installer:
- Locate the downloaded SQL Server Express installer file (e.g.,
SQL2022-SSEI-Expr.exeor the extracted setup files). Right-click the installer file and select Run as administrator. (This is important — the installer needs elevated permissions to install system services.) - On the initial screen, select Custom to access the full installation wizard. Do not select “Basic” — the Custom option gives you control over feature selection, service accounts, and FILESTREAM configuration, all of which are required.
- Choose a download/extraction location (e.g.,
C:\Temp\SQLSetup) and click Install. Wait for the media to download and extract. - The SQL Server Installation Center will open automatically. Click New SQL Server stand-alone installation or add features to an existing installation.
- Accept the license terms and click Next.
Microsoft Update
The installer may display a “Microsoft Update” page asking whether to check for updates via Windows Update.
- If the server has internet access and you want to receive SQL Server updates through Windows Update, check the box.
- If the server is offline (e.g., a lab or air-gapped environment), leave the box unchecked and click Next. The installer will not be able to reach the update servers and checking this box may cause unnecessary delays or warnings.
Install Rules
The installer runs a set of Install Rules checks (sometimes labelled “Setup Rules”). This page shows a list of checks with Pass, Warning, or Failed status. Common items include:
- Windows Firewall: A warning here is normal — it is simply reminding you that firewall ports may need to be opened (this is covered in Step 5d).
- All other rules should show Passed.
If any rule shows Failed, click the failed item to read the details and resolve the issue before continuing. Otherwise, click Next.
Azure Extension for SQL Server
SQL Server 2022 may display an “Azure Extension for SQL Server” page. This extension connects your SQL Server instance to Azure Arc for cloud-based monitoring and management.
Feature Selection
Ensure the following features are checked:
- ☑ Database Engine Services
- ☑ Full-Text and Semantic Extractions for Search
All other features can be left at their defaults (unchecked) unless you have a specific need for them.
Click Next.
Instance Configuration
Recommended: Select “Default instance” rather than a Named Instance.
Using a Default Instance means the server address is simply the hostname (e.g., ELYSE-SQL01) which aligns with the SPN registration in KCD Configuration. If you must use a Named Instance, ensure your application connects using the hostname and port (e.g., ELYSE-SQL01,1433) rather than the backslash instance name format.
Click Next.
Server Configuration (Service Accounts)
The Server Configuration page has a Service Accounts tab listing the SQL Server services and the accounts they will run under. The SQL Server Database Engine service account must be set according to your deployment type:
Account Name:
YOURDOMAIN\svc_sqlPassword: (the password set in Domain Setup)
The domain service account is required for Kerberos authentication. If the SQL Server engine runs under the default NT Service account, the SPNs registered in KCD Configuration will not match and KCD will fail.
WORKGROUP deployments (single-user, no domain): Leave the SQL Server Database Engine service account as the default (
NT Service\MSSQLSERVER). There is no domain service account in a WORKGROUP environment, and KCD is not used.
Leave the SQL Server Agent and any other service accounts at their defaults unless you have a specific reason to change them.
The Server Configuration page may also have a Collation tab. Leave the collation at the default (SQL_Latin1_General_CP1_CI_AS) unless your organisation requires a different collation. Click Next.
Database Engine Configuration
The Database Engine Configuration page has multiple tabs. Configure each as follows:
Server Configuration Tab
- Under Authentication Mode, select “Mixed Mode (SQL Server authentication and Windows authentication)”.
- Set a password for the
saaccount and record it securely. - Under Specify SQL Server administrators, click “Add Current User” to grant the current Windows account administrator access to SQL Server.
FILESTREAM Tab
Select the FILESTREAM tab and check:
- ☑ Enable FILESTREAM for Transact-SQL access
Ensure the following are UNCHECKED:
- ☐ Enable FILESTREAM for file I/O access
- ☐ Allow remote clients access to FILESTREAM data
Click Next.
Ready to Install
The installer displays a summary of all selected options. Review the summary to confirm:
- Database Engine Services and Full-Text Search are listed under features.
- The correct service account is shown (domain account for SERVER, NT Service for WORKGROUP).
- FILESTREAM is enabled for T-SQL access only.
Click Install and wait for the installation to complete. This may take several minutes. When the installation finishes, click Close.
STEP 2: INSTALL SQL SERVER MANAGEMENT STUDIO
SQL Server Management Studio (SSMS) is a separate application used to manage SQL Server — it lets you run queries, restore databases, and configure permissions. It is not included with SQL Server and must be downloaded and installed separately.
Option A: Online Installation (server has internet access)
If the target server has internet access, install the latest version of SSMS:
- On the target server, open a web browser and go to the SSMS download page (or search for “Download SQL Server Management Studio”).
- Click the Free Download for SQL Server Management Studio link. This downloads a small bootstrapper file called
vs_SSMS.exe(approximately 4 MB). This is not the full installer — it is a lightweight launcher that downloads the remaining components during installation. - Right-click
vs_SSMS.exeand select Run as administrator. - Follow the installation wizard. No special configuration is required — accept the defaults and click Install. The installer will download the required components from the internet automatically.
- When installation completes, click Close.
Option B: Offline Installation (server has no internet access)
vs_SSMS.exe) that does not reliably support offline installation. Although Microsoft documents a --layout flag for creating offline media, the resulting installer may fail silently on air-gapped servers — the “Verifying” progress bar completes but the installation never starts, and the window closes without any error message. Do not use SSMS 21 for offline installations.
For offline environments, use SSMS 19.x instead. SSMS 19 uses a traditional standalone installer (a single .exe file, approximately 700 MB) that works reliably without internet access. SSMS 19 is fully compatible with SQL Server 2022 and supports all the management tasks required by Elyse (queries, database restores, permissions configuration, etc.).
- On a machine with internet access, search for “Download SSMS 19” or “SSMS 19.3 download”. The download is available from the Microsoft Learn website (look for the SSMS release notes or previous versions page). Download the full standalone installer — the file will be named
SSMS-Setup-ENU.exeand should be approximately 700 MB.Important: Verify the downloaded file is approximately 700 MB. If the file is only a few MB, you have downloaded the SSMS 21 bootstrapper (vs_SSMS.exe) by mistake — this will not work offline. - The download is a single file named
SSMS-Setup-ENU.exe(approximately 700 MB). This is the complete installer — no additional downloads are required. - Transfer
SSMS-Setup-ENU.exeto the target server using a USB drive, network share, or any other file transfer method. Copy it to a local folder on the target server (e.g.,C:\Temp\). - On the target server, right-click
SSMS-Setup-ENU.exeand select Run as administrator. - Follow the installation wizard. No special configuration is required — accept the defaults and click Install.
- Wait for the installation to complete. When it finishes, click Close. A restart may be required.
STEP 3: VERIFY FILESTREAM AND FULL-TEXT SEARCH
If you followed Step 1 correctly, FILESTREAM and Full-Text Search are already enabled. This step verifies that both features are configured correctly before proceeding to the database restore.
Step 3a: Verify FILESTREAM in SQL Server Configuration Manager
- Open SQL Server Configuration Manager. To find it: click the Start button and type SQL Server Configuration Manager. If it appears in the results, right-click it and select Run as administrator.
If it does not appear in search: On some systems, SQL Server Configuration Manager is not listed in the Start menu. In that case: press Windows Key + R, type mmc, and press Enter. In the window that opens, click File > Add/Remove Snap-in..., find and select SQL Server Configuration Manager in the list, click Add, then click OK.
- In the left pane, click SQL Server Services.
- Right-click the SQL Server instance (e.g., “SQL Server (MSSQLSERVER)” for a Default Instance, or “SQL Server (SQLEXPRESS)” for a Named Instance) and select Properties.
- Select the FILESTREAM tab.
- Verify that “Enable FILESTREAM for Transact-SQL access” is checked. If it is not, check it now. Ensure “Enable FILESTREAM for file I/O access” remains UNCHECKED.
- Click OK (or Apply then OK if you made changes).
- Leave SQL Server Configuration Manager open. You will return to it to restart the service after the next step.
Step 3b: Verify FILESTREAM and Full-Text Search via T-SQL
- Open SQL Server Management Studio (SSMS). To find it: click the Start button and type SSMS or SQL Server Management Studio. Click the result to open it.
- The “Connect to Server” dialog will appear automatically. Enter the following:
Server name .\(for Default Instance) or.\SQLEXPRESS(for Named Instance)Authentication Windows Authentication Encrypt Optional Trust Server Certificate Checked - Click Connect.
- Click New Query and execute the following to verify (and ensure) FILESTREAM is enabled at the T-SQL level:
EXEC sp_configure 'filestream_access_level', 1; RECONFIGURE;Expected result: “Configuration option 'filestream access level' changed from 1 to 1” (confirming it was already enabled). If it shows “changed from 0 to 1”, FILESTREAM was not enabled during installation and has now been enabled.
- Open a new query and verify Full-Text Search is installed:
SELECT FULLTEXTSERVICEPROPERTY('IsFullTextInstalled');Expected result:
1. If the result is0, Full-Text Search was not installed during Step 1. You will need to uninstall and reinstall SQL Server with the “Full-Text and Semantic Extractions for Search” feature included.
Step 3c: Restart the SQL Server Service
- Return to SQL Server Configuration Manager.
- In the left pane, click SQL Server Services.
- Right-click the SQL Server instance and select Restart.
STEP 4: FILESTREAM DATA FOLDER (OPTIONAL)
When the database is restored in Step 6, SSMS will display a Files page showing where each database file will be restored to, including the FILESTREAM container. SSMS automatically proposes default paths based on the target server’s SQL Server data directory. You can accept the defaults or choose a custom location.
C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\), you can skip this step entirely — the SQL Server service account already has the necessary permissions on its own data directory.
If you want to store the FILESTREAM data on a different drive or custom location (recommended for production environments), create the parent folder now and set the appropriate permissions. You will specify this path during the database restore in Step 6.
Considerations for Choosing a Custom Location
- Separate physical drive: Store FILESTREAM data on a different drive from the OS and SQL Server system databases to reduce I/O contention.
- Storage capacity: Choose a location with ample space for projected data growth.
- Performance: Use fast storage (SSD recommended) for frequently accessed data.
- Backup and recovery: Include the location in regular backup routines.
- Security: Restrict access to the SQL Server service account and administrators.
- Redundancy: Consider RAID or SAN for high-availability requirements.
- Compliance: Ensure the location meets any data residency or regulatory requirements.
Example custom location: D:\FILESTREAMData\Elyse_DB\
Create the Folder and Set NTFS Permissions
- Create the parent folder (e.g.,
D:\FILESTREAMData\Elyse_DB). SQL Server will create the FILESTREAM container inside this folder during the database restore. - Right-click the folder and select Properties.
- In the Properties dialog, click the Security tab.
- Click the Edit... button.
- In the Permissions dialog, click the Add... button.
- In the “Select Users, Computers, Service Accounts, or Groups” dialog, type the SQL Server service account:
- SERVER deployments:
YOURDOMAIN\svc_sql(replaceYOURDOMAINwith your actual domain name) - WORKGROUP deployments:
NT Service\MSSQLSERVER
- SERVER deployments:
- Click Check Names to verify the account resolves (it will become underlined if found), then click OK.
- Back in the Permissions dialog, select the service account in the “Group or user names” list.
- In the permissions section below, check the Full control checkbox under the Allow column.
- Click Apply, then click OK to close the Permissions dialog.
- Click OK to close the Properties dialog.
STEP 5: CONFIGURE TCP/IP PROTOCOL AND PORT ASSIGNMENT
By default, SQL Server Express only accepts connections from the same machine. To allow the backend server (on a different machine) to connect, we need to enable the TCP/IP network protocol and assign a fixed port number.
Step 5a: Enable the TCP/IP Protocol
- Open SQL Server Configuration Manager (if it is not still open from Step 3). Right-click and select Run as administrator.
- In the left pane, expand SQL Server Network Configuration.
- Click “Protocols for MSSQLSERVER” (Default Instance) or “Protocols for SQLEXPRESS” (Named Instance).
- In the right pane, right-click TCP/IP and select Enable.
- Click OK on the warning about restarting the service.
Step 5b: Set the Port to 1433
- Right-click TCP/IP and select Properties.
- Click the IP Addresses tab.
- Scroll to the IPAll section at the bottom.
- Clear the TCP Dynamic Ports field (leave it blank).
- In TCP Port, enter:
1433 - Click OK.
Step 5c: Restart the SQL Server Service
- In the left pane, click SQL Server Services.
- Right-click the SQL Server instance and select Restart.
Step 5d: Configure the Windows Firewall
Open a Command Prompt as Administrator: click the Start button, type cmd, then right-click Command Prompt in the results and select Run as administrator. Type the following command and press Enter:
netsh advfirewall firewall add rule name="SQL Port 1433" dir=in action=allow protocol=TCP localport=1433
This allows inbound TCP connections on port 1433 from the backend server.
STEP 6: RESTORE THE DATABASE
The Elyse database contains graph tables and preconfigured data. The initial deployment is performed by restoring from a database backup file. For subsequent upgrades, use Visual Studio SQL Server Data Tools.
Step 6a: Extract the Backup File
- Locate the database backup package (
Elyse_DB_*.zip) that you downloaded. - Right-click the zip file and select Extract All...
- Choose a destination folder (e.g.,
C:\Temp\) and click Extract. - Note the location of the extracted
.bakfile — you will need this path in the next step.
Step 6b: Restore the Database
- Open SSMS if it is not already open.
- In the “Connect to Server” dialog, set Server name to
.\(for Default Instance) or.\SQLEXPRESS(for Named Instance), set Authentication to Windows Authentication, and click Connect. - In Object Explorer, right-click Databases and select “Restore Database...”
- In the Restore Database dialog:
- Select “Device:” and click the [...] button.
- Click Add and browse to the backup file.
- Select the file and click OK to load the backup contents.
- Switch to the Files page (Select a page panel on the left).
The Database files grid shows three files with their original paths (from the backup) and proposed “Restore As” paths (where they will be restored on this server). SSMS automatically proposes paths based on the target server’s default data directory.
- Review the “Restore As” column for each file:
- Data file (.mdf) — the main database file
- Log file (.ldf) — the transaction log
- FILESTREAM (File Type = FILESTREAM) — the document storage container
- You can accept the default paths proposed by SSMS, or change them to custom locations. If you prepared a custom FILESTREAM folder in Step 4, update the FILESTREAM “Restore As” path to point to that folder. Type the new path directly into the field, or click [...] to browse. The parent folder must already exist.
- Review the “Restore As” column for each file:
- Switch to the Options page (Select a page panel on the left).
- Check “Overwrite the existing database (WITH REPLACE)” if restoring over an existing database.
- Verify all file paths are correct and accessible.
- Click OK to start the restore.
The script CleanDatabaseRestore.sql may also be used to restore a database as an alternative to the SSMS GUI.
Step 6c: Verify the Database
- In the Object Explorer panel (left side of SSMS), click the + icon next to Databases to expand it. Then click the + next to Elyse_DB, then Programmability, then Stored Procedures.
- Scroll to:
reading.usp_SEL_files_contains - Right-click the stored procedure name and select Execute Stored Procedure...
- In the “Execute Procedure” dialog, you will see a grid with parameter names. Click in the Value column next to the first row (
@containsstring) and type the wordstructure. - Click OK.
- Expected result: A table of data and the message “Transaction successful”.
If you see an error about full-text indexing not being installed, you will need to uninstall and reinstall SQL Server with Full-Text Search included (see Step 1).
STEP 7: CONFIGURE SQL SERVER LOGIN AND PERMISSIONS
This step creates the SQL Server login that maps to the Active Directory security group, allowing Elyse users to connect to the database.
Step 7a: Create the Windows Login for the AD Group
You can create the login using either the SSMS GUI or a T-SQL script. Both methods achieve the same result.
Option 1: Using the SSMS GUI
- In SSMS (still open from Step 6), ensure you are connected to the SQL Server instance.
- In the Object Explorer panel, expand Security (the server-level Security node, not the one under a database).
- Right-click Logins and select New Login...
- In the “Login — New” dialog:
- Click Search... next to the Login name field.
- In the “Select User or Group” dialog, click Object Types... and ensure Groups is checked. Click OK.
- Click Locations... and in the “From This Location” tree, select Entire Directory (the top-level node). Click OK.
- Type
Elyse_Usersin the object name field and click Check Names. It should resolve toYOURDOMAIN\Elyse_Users. Click OK.
- Ensure Windows authentication is selected.
- Click OK to create the login.
Option 2: Using T-SQL
- Click the New Query button in the toolbar (or press Ctrl+N). A blank query editor tab will open.
- Type or paste the following SQL command and press F5 (or click the Execute button) to run it:
CREATE LOGIN [YOURDOMAIN\Elyse_Users] FROM WINDOWS;Replace
YOURDOMAINwith your actual domain name.
Step 7b: Create the Database User and Grant CONNECT
Now map the login to the Elyse database and grant the CONNECT permission.
Option 1: Using the SSMS GUI
- In Object Explorer, expand Security > Logins.
- Double-click the
YOURDOMAIN\Elyse_Userslogin to open its properties. - In the “Select a page” panel on the left, click User Mapping.
- In the “Users mapped to this login” grid, find Elyse_DB and check the box next to it.
- In the “Database role membership” section below, ensure only public is checked. Do not check any other roles (such as db_owner or db_datareader).
- Click OK.
Option 2: Using T-SQL
- Click the New Query button in the toolbar (or press Ctrl+N) to open a new query editor tab. Type or paste the following SQL commands and press F5 to execute:
USE [Elyse_DB]; CREATE USER [YOURDOMAIN\Elyse_Users] FOR LOGIN [YOURDOMAIN\Elyse_Users]; GRANT CONNECT TO [YOURDOMAIN\Elyse_Users];Replace
YOURDOMAINwith your actual domain name.
sp_setapprole. Individual users have no direct data permissions.
Step 7c: Verify Application Roles and Set Passwords
The database backup includes seven application roles. Verify they exist and set their passwords.
Verify the Roles
- In the Object Explorer panel (left side of SSMS), click the + icon next to Databases to expand it, then expand Elyse_DB, then Security, then Roles, then Application Roles.
- Confirm the following roles are present:
- CONFIGURATOR
- READER
- REVIEWER
- CONTROLLER
- EDITOR
- AUTHORISER
- OWNERSHIP_CHAIN
Set the Application Role Passwords
Each application role has a password that the backend uses to activate the role via sp_setapprole. The passwords set here must match the passwords later configured in the backend .env file. Set or change each role’s password as follows:
- In the Object Explorer panel, under Elyse_DB > Security > Roles > Application Roles, double-click the first role (e.g., CONFIGURATOR) to open its properties.
- In the “Application Role Properties” dialog, clear the Password field and type a new strong password. Re-enter the same password in the Confirm password field.
- Click OK.
- Record the password securely — you will need to enter it in the backend
.envfile during backend installation. - Repeat for each of the remaining roles: READER, REVIEWER, CONTROLLER, EDITOR, and AUTHORISER.
See Backend Installation (Server) — Step 2: Configure .env or Backend Installation (Workgroup) — Step 3: Configure .env for where these passwords are entered.
Set the OWNERSHIP_CHAIN Password
- In the Application Roles list, double-click OWNERSHIP_CHAIN to open its properties.
- Clear the Password field and type a long random string. Re-enter the same string in the Confirm password field.
- Click OK.
- Do not record this password anywhere. Do not add it to the backend
.envfile.
Step 7d: Service Account Restrictions (SERVER Only)
svc_elyse_be. The SERVER backend service account (svc_elyse_be) must never connect to SQL Server directly. It must not have a SQL Server login and must not be a member of the Elyse_Users AD group. The SERVER backend connects to SQL Server exclusively through KCD impersonation of the authenticated user. If svc_elyse_be has its own SQL Server login, KCD impersonation will not be used and the security model will be bypassed.
svc_elyse_ro) which does require its own SQL Server login. This is a different account from svc_elyse_be and is configured separately. See Backend Installation (Read-Only) for those instructions.
STEP 8: RESTART AFTER DATABASE INSTALLATION
If a new copy of the database is installed by restoring over an existing one, restart the backend application pool and the web server (e.g., IIS) to clear any cached connections.
NEXT STEPS
SERVER deployments:
- Proceed to KCD Configuration to register Service Principal Names (SPNs) and configure Kerberos Constrained Delegation.
- After KCD is configured, install the backend and frontend application layers.
- After the application layers are installed, proceed to Bootstrapping to onboard users and configure the system.
WORKGROUP deployments:
- Skip KCD. Proceed to Backend Installation (Workgroup).
- After the backend is installed, install the frontend.
- After both layers are installed, proceed to Bootstrapping to onboard the user and configure the system.