How To Install SQL Server in Domain Controller
How To Install SQL Server in Domain Controller
SAMOSQL
https://samosql.com/2016/09/21/install-sql-dc/ 1/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
WHY THEN?
Not all customers have a huge budget for IT to have dedicated servers and resources to handle
multiple processes and applications. You would see small business where one server plays
multiple roles as the DC, SQL Server, Application Server, and etc.
We do not recommend this type of infrastructure since there is a single point of failure for the
entire system. Also security restrictions can be breached or conflicts can occur in the
setup/implementation of all these applications on the same server.
https://samosql.com/2016/09/21/install-sql-dc/ 2/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
https://samosql.com/2016/09/21/install-sql-dc/ 3/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
Summary.txt
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2061893606
Start time: 2016-05-17 21:47:29
End time: 2016-05-17 22:03:24
Requested action: Install
https://samosql.com/2016/09/21/install-sql-dc/ 5/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
THE FIX
+As noted for why we do the recommend this type of setup; you should by now know that the
resolution for the encountered error would have to do with PERMISSIONS.
++Setup user account: Domain Account and its part local admin group
+check whoami /all for privileges
https://samosql.com/2016/09/21/install-sql-dc/ 6/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
>>Check to make sure privileges listed below are assigned SQL Setup user or the group it
belongs to.
1. Act as Part of the Operating System
2. Bypass Traverse Checking
3. Log on as Batch Job
4. Log on as Service
5. Replace a Process Level Token
6. Debug Programs
7. Backup files and directories
8. Restore files and directories
>>Turn off UAC
>>Check to see Default domain policies are defined
Opened Group policy Management > Edit Default Domain controller Policies.
https://samosql.com/2016/09/21/install-sql-dc/ 7/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
>Under the Edit Dialog Box -Expand Policies > Windows Se!ings > Security Se!ings > User
Rights Assignment and define the SQL Setup account to the same policies:
1. Act as Part of the Operating System**
2. Bypass Traverse Checking**
3. Log on as Batch Job
4. Log on as Service
5. Replace a Process Level Token
6. Debug Programs
7. Backup files and directories
8. Restore files and directories
NOTE: ** Once you completed the installation successfully, you might want to remove the SQL
setup account from the policies indicated above. This is for security reasons and prevent issues
like defining traverse checking on the domain.
>>Uninstall the
previous version of the failed Setup. No need to repair and try to troubleshoot to fix error.
>>Reboot the Server (HIGHLY RECOMMENDED)
>>Log on to the Server with the SQL Setup user account
>>Run a new installation of media using elevated privileges
>>Set SQL Server Service account as Windows domain user accounts during the Server
Configuration step.
SQL Server service accounts should run as Windows domain user accounts. It is also possible to
install SQL Server service accounts to run as Local System, but this option is NOT
recommended.
NOTE: You cannot run SQL Server services on a domain controller under a local service account
or a network service account.
https://samosql.com/2016/09/21/install-sql-dc/ 8/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
h!ps://msdn.microsoft.com/en-us/library/ms143506(v=sql.100).aspx#DC_Support – Hardware
and Software Requirements for Installing SQL Server 2008
h!ps://msdn.microsoft.com/en-us/library/ms143506(v=sql.110).aspx – Hardware and Software
Requirements for Installing SQL Server 2012
h!ps://blogs.technet.microsoft.com/mdegre/2011/06/25/can-i-install-sql-server-on-a-domain-
controller/ – Can I install SQL Server on a domain controller?
https://samosql.com/2016/09/21/install-sql-dc/ 9/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
Published by samosql
1. Onye Somi
says:
October 21, 2016 at 1:52 pm
Very informative. Thank you sir
2. Nick
says:
October 29, 2016 at 9:37 pm
You mention performance issues if installing on a DC. Are there any recommendations for
improving performance for a SQL Server installed on a DC?
1. gaoussou bagate
says:
November 24, 2016 at 1:48 pm
Hi Nick,
Unfortunately, there is no way to improve the performance. What we mean here is that
SQL server and Windows Active directory will share server resources all together. if you
have a busy Domain controller with a DNS role for example which handle multiple
connection requests as SQL server, you could face connection timeout in this case. And
don’t forget the security risk. This is why it is always good to have dedicated servers : 1
server for your DC, 1 server for application ,1 server for databases.
Gaoussou Bagate.
https://samosql.com/2016/09/21/install-sql-dc/ 10/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
3. Marcel Stolle
says:
November 16, 2016 at 5:03 am
Not bad
4. Kyssling
says:
February 13, 2017 at 9:07 am
Hello,
I installed SQL Server 2016 Standard on the domain controller Windows Server 2012 R2.
Services Engine and Agent now I run as Local System.
Vaclav
1. samosql
says:
February 13, 2017 at 6:37 pm
Hi Kyssling,
I tried and tested your scenario on Windows Server 2012 R2 and it worked successfully.
You just need to make sure the SQL Service account you are using is part of the
administrators group and assign the necessary privileges in the post. Your SQL Service
would restart and run successfully with this new account.
NOTE: Giving the service account admin privileges would provide it read/write
permissions to the default SQL folders. In some rare scenarios, you would have to
explicitly provide permissions to drive/network share folders that the SQL instance uses.
This part is per your environment setup.
5. Kyssling
says:
February 14, 2017 at 7:29 am
Hello,
https://samosql.com/2016/09/21/install-sql-dc/ 11/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
1. samosql
says:
February 20, 2017 at 12:58 pm
Sorry for the late response I was caught up with some consultation work. I just tested
out your request and YES it worked as well as long as you set the permissions right to
access the required files and services.
I have SQL Server Service on my DC running under an account I called
(SAMOSQL\Nonadmin) in my test lab who is only part of the Domain Users Group.
Please let me know if you have questions or suggestions.
Thank you and HTH
1. kyssling
says:
February 24, 2017 at 9:29 am
Hello, I tried and works perfectly. Thank you for your help.
Can I please have to ask two more questions (last i promise )
Is standard (or necessary for small company) deploy for authentication using SQL –
SSL for be!er security ?
If I had understood correctly Kerberos is used only if used Windows Authentication
…
2. samosql
says:
February 28, 2017 at 3:42 pm
I am glad it worked and you are welcome! Your question about security is very
interesting and a good topic to blog on. I am currently writing up a blog which would
address your questions and even more. I will update you once I publish the blog. In
the meantime, SQL by default creates SSL encryption (128 bit) which is overall
secured. When you want to implement Kerberos then you would be looking into
se!ing up SPN’s. Note however if the Kerberos handshake fails, Windows will
automatically fallback to the default NTLM. I will elaborate more in my blog i
promise. Finally feel free to ask more questions.. I always appreciate great discussions
like this. Cheers!
6. Rick
says:
May 3, 2017 at 9:27 pm
Did something change with SQL 2016 SP1? I tried installing it on Server 2016 (maybe that’s
why?) DC, but there were no errors, and all services are running.
1. samosql
https://samosql.com/2016/09/21/install-sql-dc/ 12/13
6/17/2018 Installing SQL Server on a Domain Controller – SAMOSQL
says:
May 12, 2017 at 4:25 pm
Great finding with the new Windows Server 2016. Check out this official documentation
on Microsoft’s BOL for SQL Server 2016 – h!ps://docs.microsoft.com/en-us/sql/sql-
server/install/hardware-and-software-requirements-for-installing-sql-server
It mentions that as long as the SQL Server Service account is not running under Local
Service then it should work. Looks like yours is running under the default Service
Account that is created during the installation.
This should work even for SQL Server 2016 RTM on Windows Server 2016 Writable DC. I
will test it out myself with different scenarios and update you with my findings.
1. Rick
says:
May 15, 2017 at 9:20 am
That part of the documentation though is just a copy and paste of 2012’s (and maybe
2012’s of 2008’s, I didn’t check), so what they’re saying hasn’t changed.
But the default install of 2016 does have SQL Server Browser (and maybe more in a
fuller install) under Local Service. No complaints from Setup, and it works.
UP ↑
https://samosql.com/2016/09/21/install-sql-dc/ 13/13