About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
In a hosted environment, keep the domain controller on its own virtual machine, together with the directory-related roles it normally carries such as DNS, and never put SQL Server or line-of-business software on it. File shares, an application server and SQL Server can sometimes share a server in a very small estate, but each combination has a cost in security, performance tuning or maintenance windows. Because adding a virtual machine in hosting does not mean buying hardware, the old habit of piling roles onto one box saves less than it used to.
Why it matters
When a business moves from one office server to hosting, the easy path is to copy the old layout: one server that is the domain controller, file server, application server and database. That layout means one restart stops everything, one compromised application can reach the directory that controls every account, and one set of updates must suit every role. Separating roles costs some licence and resource overhead; combining them costs resilience and security. You need to know which trade-offs are acceptable.
How it works
The four roles in a typical small estate
- Domain controller: holds user accounts, passwords and group policy. It is the system an attacker most wants.
- File server: shared folders and home drives.
- Application server: the line-of-business software, often installed by a vendor.
- Database server: usually Microsoft SQL Server, holding the application's data.
What Microsoft says about domain controllers
Microsoft's guidance on securing domain controllers explains the stakes: if privileged access to a domain controller is obtained, "a malicious user can modify, corrupt, or destroy the AD DS database and, by extension, all of the systems and accounts managed by Active Directory". It recommends separating patch and systems management for domain controllers so that you "reduce the amount of software installed on domain controllers". Even for a branch with only one physical server, it advises that one virtual machine runs as a read-only domain controller and "other servers should run as separate virtual machines on the host". "Domain controller only" does not mean stripping out the roles the directory relies on: Microsoft's installation guide notes that "the DNS server is installed by default when you run Install-ADDSForest". The aim is to keep unrelated business software off it.
What Microsoft says about SQL Server on a domain controller
The SQL Server 2022 requirements page is direct: "For security reasons, don't install SQL Server on a domain controller". Setup does not block it, but limitations apply, including that SQL Server services cannot run under a local service account on a domain controller.
What changes when SQL Server shares a server with other software
SQL Server takes memory as it needs it. Microsoft's recommended maximum memory setting is "75% of available system memory not consumed by other processes, including other instances", so when an application or file service runs on the same server, someone has to set and revisit SQL Server's limit. Our published articles cover this pair in depth: SQL Server and the application on one server or two and SQL Server memory on a hosted VM: max server memory, lock pages and what to leave for Windows. This article covers the wider question of which roles may share at all.
What to choose and why
| Combination | Recommendation | Reason |
|---|---|---|
| Domain controller + DNS and other directory-related services | Normal | Microsoft's own setup installs DNS with a new forest by default; these roles support the directory itself |
| Domain controller + business applications, SQL Server or general file workloads | Avoid | Our editorial advice, built on Microsoft's advice to reduce software on domain controllers and its explicit "don't install SQL Server" statement |
| Domain controller + file shares | Avoid | Users and staff need routine access to file servers, which widens access to the most sensitive server |
| Application + SQL Server | Acceptable for small estates if the vendor supports it | Needs memory limits and shared maintenance windows |
| File shares + application server | Acceptable for small estates | Both restart together; separate if either needs frequent restarts |
| Everything separate | Best isolation | More virtual machines to patch, monitor and license |
The table is editorial guidance built on the sources above, not a Microsoft rule beyond the two domain controller statements.
A hypothetical layout for 20 staff
- Virtual machine 1: domain controller, with DNS, and no business software.
- Virtual machine 2: a second domain controller, if the business wants sign-ins to survive the first being down or under maintenance.
- Virtual machine 3: application server and SQL Server combined, as the vendor supports, with SQL Server's memory capped.
- Virtual machine 4: file server.
As the business grows or the database gets busier, the application and SQL Server are the first pair to split. The example is illustrative.
What to check before combining
- Does the software vendor support the combination in writing?
- Can both roles accept the same restart times?
- Who sets and reviews SQL Server's memory limit when other software is present?
- Does combining change the number of operating system or SQL Server licences under your hosting agreement? Ask the provider, because hosted licensing is often charged differently from licences you buy outright.
Read next
Related articles you may want next.
- HostingSQL Server and the application on one server or twoWhen running a business application and its SQL Server database on the same hosted server saves money, and when it causes memory contention, extra per-core licensing, wider security exposure and coupled outages.Read article
- HostingIdentity for hosted servers: extend your domain, build a new one, or use Entra IDWhich sign-in and directory design suits Windows servers moved to a hosting provider: extending the existing Active Directory domain, building a separate domain, or using Microsoft Entra services, with what each depends on.Read article
- HostingSQL Server memory on a hosted VM: max server memory, lock pages and what to leave for WindowsHow to size SQL Server's memory cap on a hosted virtual machine using Microsoft's own method, when min server memory matters on a VM, and when granting Lock Pages in Memory is and is not appropriate.Read article
Risks and limits
- Copying the office layout. A single all-in-one server carries the same weaknesses in a data centre as it did in the office.
- Hidden coupling. A file-share change or application update that needs a restart takes the database down too when they share a server.
- Memory contention. SQL Server without a sensible limit can starve other software on the same server.
- Licensing assumptions. Licence rules differ between purchased and hosted licences. This article does not give licensing advice; confirm with the provider and your licensing adviser.
- Vendor support. Some vendors require their application and database on separate servers; check before you combine.
Sources
Opened 15 November 2026.
- Microsoft Learn: Securing Domain Controllers Against Attack, page shows last updated 9 July 2025.
- Microsoft Learn: Install Active Directory Domain Services (Level 100), page shows last updated 21 April 2025 (opened 16 November 2026, for DNS being installed with a new forest).
- Microsoft Learn: SQL Server 2022: Hardware and Software Requirements, page shows last updated 20 July 2026.
- Microsoft Learn: Server Memory Configuration Options, page shows last updated 11 May 2026 (page metadata: modified 19 October 2026).
Dates are those the pages display, rechecked 16 November 2026.
Related articles: SQL Server and the application on one server or two; SQL Server memory on a hosted VM: max server memory, lock pages and what to leave for Windows.
Related service: Cloud hosting.
Learning notes
- The domain controller controls every account; keep it on its own virtual machine with DNS, away from business software.
- Microsoft says not to install SQL Server on a domain controller.
- SQL Server's memory limit must leave room for anything else on the same server.
- Combining roles ties their restarts and maintenance together.
- In hosting, an extra virtual machine is a resource cost, not a hardware purchase.
This article was originally published on .