---
title: "External database server settings (optional)"
canonical: "https://docs.cuesystem.com/space/Dep/152043547/External%20database%20server%20settings%20(optional)"
format: markdown
---
CUE Solution uses MS SQL Express database server by default, which is installed automatically together with other components using the Cue Control Panel. If you have an external MS SQL server and want to use it as a database server for CUE Solution, follow these instructions.

CUE Solution allows connection to an external database MS SQL Server. This can be useful when you run the MS SQL Server in your infrastructure, it is backed up, etc. In order for the CUE Solution to be able to connect to an external MS SQL server, the following must be ensured. We assume that if you use an MS SQL Server, you also have a basic knowledge of its administration, so the procedures listed here are not described in full detail.

## MS SQL server settings

- TCP port 1433 must be enabled for remote access to the MS SQL Server. Start the *SQL Server Configuration Manager*.

![image](media://eaef5561-d7e2-47bc-afe8-70fca743f848)

In the item *SQL Server Network Configuration / Protocols for MSSQLSERVER* set *TCP/IP* to value *Enabled*.

- It is also necessary to ensure that access to MS SQL Server is enabled in the firewall of the Windows server on which the MS SQL server is running. Details of the firewall settings can be found here: [Configure the Windows Firewall to Allow SQL Server Access](https://docs.microsoft.com/en-us/sql/sql-server/install/configure-the-windows-firewall-to-allow-sql-server-access?view=sql-server-ver15). You may need to use the following command run with Power Shell with admin rights:  
*netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = SUBNET profile = CURRENT*

For the next settings, SSMS (Microsoft SQL Server Management Studio) is used to manage MS SQL Server.

- Remote access to the server must be enabled. To do it, right-click on the selected server in object explorer, select *Properties/Connections*, and select *Allow remote connection to this server*.

![image](media://994791b0-a2bf-49b5-b65d-c580b4817bc9)

- You must enable *SQL Server and Windows Authentication mode* on the server. To do it, right-click on the selected server in object explorer, select *Properties/Security*, and select *SQL Server and Windows Authentication mode*.

![image](media://2f82a3fa-1d1f-4c1d-a631-70442191a5e5)

## Creating a DB user for CUE-server access to the MS SQL server

- It is necessary to create a user with whom the CUE Server will log in to MS SQL Server. To do it, right-click on the item *Server/Security/Logins* in the server tree structure and select *New Login…*.

![image](media://73460542-6abf-4034-b45b-09778f3c2c1b)

- Here create and enter a unique *Login name*, e.g. **touchonedbadmin**. **DO NOT USE** the names **sa**, **admin** and **administrator**, as these are reserved for other purposes.
- Select *SQL Server authentication*.
- Create a password for the **touchonedbadmin** and enter it twice in the appropriate fields.
- Uncheck the option *Enforce password policy*.
- Confirm the creation of the login with the *OK* button.


- Now you need to assign the necessary rights to the new login. Double-click on the newly created login, e.g, in the tree to the item *Server/Security/Logins/touchonedbadmin*.

![image](media://0c83c37b-4b10-4236-8959-434d4e8270fc)

- Here select page *Server Roles* and check items *sysadmin* and *serveradmin*.
- Confirm it with the *OK* button.

## Creating a DB user for CUE calendar server access to the MS SQL server

- Since CUE Solution version 10, it includes its own calendar server that stores the data in a separate database. Therefore it is necessary to **create**** an account for it**, through which the **calendar server will communicate with the MS SQL server**.
  - You can either **use the same account** you created in the previous steps. In that case, you **don't need to do anything**.
  - Or you can** create a separate account** to access the database server. In that case, use the **same procedure as described above, just use a different username and password**.
- You will then specify the accounts in the CUE Solution Setup when setting up access to the appropriate databases.


Now MS SQL Server is ready so that the CUE Server can store the database on it. 

> ⚠️ **DO NOT CREATE ANY NEW DATABASE ON THE MS SQL SERVER !!!** The new database will be created automatically during installation using the CUE Solution Setup. Create a unique database name that is not used on the MS SQL Server. This database name, newly created login, password, and MS SQL Server IP address or URL you will need later when installing using [CUE Solution Setup](https://cue.atlassian.net/wiki/spaces/Dep/pages/151748649).