> [!warning]
> Making changes to MS SQL can be dangerous, please make sure you are familiar with processes and have backed up configuration data as required.
>
This guide is for installation of the i-PRO Active Guard server where you will need to share the MS SQL database with Milestone XProtect. As default i-PRO Active guard will install MS MSQL. This could replace the Milestone XProtect configuration database and end you up with a who heap of trouble.
As Default Milestone XProtect uses Local Windows Authentication in the (All-In-One) installation method. The i-PRO Active Guard installer requires SQL User authentication. There are a couple of steps you will need to follow to enable this on the Milestone XProtect server.
# Update SQL Server (local)
Editing the SQL Database settings requires the `SQL Server Management Studio` to be installed.
> [!info]
> MS SQL Server Management Studio (Takes a long time to install)
> [Install SQL Server Management Studio | Microsoft Learn](https://learn.microsoft.com/en-us/ssms/install/install)
You want to use the Windows Account that was used to install Milestone XProtect, otherwise you can be blocked from login in.
[Open] and [Connect]
First time connection you need to enter the server name `localhost` then set [Encryption] to `Optional` and tick `Trust Server Certificate`
![[z_img/dd10d148ed3fae869f7d977ab341b772_MD5.jpg|400]]
Right click the server name from the [Object Explorer] and select [Properties]
![[z_img/60ac1c3da37a19fd5fb6c7baeef892ff_MD5.jpg|400]]
Find [Security] then switch [Server Authentication] to `SQL Server and Windows Authentication mode`. Press [OK] to exit.
![[z_img/4a6761a24511bf5e9550ddc5cf8dffb4_MD5.jpg|500]]
Once done you will need to [Restart] the SQL Server service.
![[z_img/34aa1db04cafe49724f4b9ecf2a0952d_MD5.jpg]]
## Add SQL User
Reconnect to `SQL Server Management Studio` and connect to the SQL Server.
Expand the Server name, Open [Security] and right click [Logins], press [New Login..].
![[z_img/f08b9f4803771b1da86296cefbc85515_MD5.jpg]]
Set the login name `ipro`
Set [SQL authentication] and enter a password to use.
[Untick] Enforce password expiration
[Untick] User must change password at next login
Press [OK]
![[z_img/e5b7a22a06d628bab93c78e0df26680b_MD5.jpg|600]]
Go to [Server Roles]
Add `sysadmin` this allows the user account to create new databases then get access to the database afterwards. However this is for all database, so this can be updated later on.
![[z_img/6b8dbe9b72ae09d4acffc3b14803fd4e_MD5.jpg|600]]
To test this configuration you can use a `.UDL` file. Make a new Text Document then rename to `SQL-Test.udl`.
If you don't see the file extension, enabled via Explorer.
![[z_img/054694c58ef41707d5c9cb5861b44c9d_MD5.jpg]]
The new file will show like this, it will open `OLE DB Core Service`
![[z_img/0d07d5812415609c7b7b5c9909465e5e_MD5.jpg]]
Add the loopback IP `127.0.0.1`
Select [Use a specific username and password]
Add your username and password.
Now in option `3.` you will be able to select a database from the dropdown. This step only works if the tool is able to connect to the SQL Server and authenticate.
![[z_img/5b0b2ef38e9ea7600815fbf427fd4dbb_MD5.jpg]]
Click [Test connection]
![[z_img/46e087f717d284549141aaa26008b5ec_MD5.jpg]]
# Milestone XProtect User Account
i-PRO Active Guard requires an **XProtect Basic User Account** to connect to XProtect.
Generate a new basic user under the role of your choosing, recommended `Adminsitrator` for ease however site security will dictate.
![[z_img/73587d1d6cfcbfb9c7d4906c91552e27_MD5.jpg|400]]
# i-PRO Active Guard Installation
> [!note]
> For this test we are using **Active_Guard_Server_VMS_v3_03**
>
Right click `MultiAIStartup.exe` and [Run as administrator] (This is helpful whenever making changes to SQL, you may require further permissions on a domain).
License terms
![[z_img/df9dd552087ab8e0bf8a18082dbcf6a2_MD5.jpg|500]]
Is the VMS System you use "Genetec"? [No]
![[z_img/15216fccef6036dbd64a17eb2da4de7f_MD5.jpg|350]]
Select [install to dedicated server PC] (The other option is for Video Insight or Genetec).
Select [Use existing SQL Server instance]
Press [Database Settings]
![[z_img/42461326d2d9e03df6a9f3b755ac1b2b_MD5.jpg]]
The Instance dropdown should show `MSMSQSERVER`
Then enter the username and password we setup for MS SQL.
![[z_img/410b9c97f1ddffb455d172fb23e0814f_MD5.jpg|450]]
Press [Connect]
We should see `Connection to SQL Server succeeded`
![[z_img/1493473140baf3c0423f1b624fcd9d9b_MD5.jpg|450]]
Next set an i-PRO admin user account, this is for Active Guard.
![[z_img/666f6e12243d7426f4796fc848c8ed8b_MD5.jpg]]
All should finish ok, press [Next]
![[z_img/8c5ae3d384e2e963ffdffb92d61b87ff_MD5.jpg]]
Initial settings, change if required.
![[z_img/06fe9e85fb83e63bfa3e10dbf02e8c14_MD5.jpg]]
Warning, shown related to image folder. When you press [Yes] the exclusion is automatically added.
![[z_img/969ed5e1054e7d84f41b670bc90f64e7_MD5.jpg|350]]
> [!info]- Manual add exclusion to Windows Defender
> Go to **Windows Security** > **Virus & threat protection** > **Virus & threat protection settings** > **Manage settings** > **Exclusions** > **Add or remove exclusions**
> [+ Add an excusion] > **Folder** `C:\MultiAI\Image`
Enter the Milestone XProtect basic user account we generated earlier and press [Save].
![[z_img/e89b2323efc0c2152edde4e682df5a5c_MD5.jpg]]
If this is able to connect to Milestone XProtect you will see `Succeeded` show.
Press [Finished]
![[z_img/e6b128c5dd174952bc6ccb99560e9a81_MD5.jpg]]
Launch web browser for configuration? [Yes]
![[z_img/7c14b1aa0501930f758aebe075b64d14_MD5.jpg|400]]
Use the i-PRO admin user account setup in Step 2 of installation.
![[z_img/d3eda633f54ab5abda122b6d39613b0d_MD5.jpg]]
Your i-Pro Active Guard installation is now ready.
![[z_img/2f2ca9053522fd466ec724ea11b91ace_MD5.jpg]]