Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By : Donabel Santos
Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By: Donabel Santos

Overview of this book

Table of Contents (21 chapters)
SQL Server 2014 with PowerShell v5 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring a domain controller (optional)


In a production environment, it is not recommended that you install the domain controller with any of your other server software. Doing so will have a negative impact on your SQL Server installation, as outlined in https://msdn.microsoft.com/en-us/library/ms143506.aspx#DC_support.

It is still helpful to have access to a domain controller to get a feel of how a "production environment" works, or understand how to create and manage domain accounts, among other tasks. If you have a spare VM (or if you can create another one), it would be best to install your domain controller on a different VM. However, if you are working with only a single VM, we can install this role on the same machine. Make sure you note down the limitations as specified in https://msdn.microsoft.com/en-us/library/ms143506.aspx#DC_support.

If you want to mimic a production setup, you can create another Windows Server 2012 R2 VM with a different computer name, and perform the following steps:

  1. Launch VMWare Player.

  2. Play SQL2014VM.

  3. Log in to the VM.

  4. In Server Manager, click on the Manage menu item and select Add Roles and Features from the drop-down menu. This will launch the Add Roles and Features Wizard.

  5. On the Select installation type screen, choose Role-based or feature-based installation, which will configure a single server by adding roles and role services and features:

  6. On the Select destination server screen, select the current server:

  7. On the Select server roles screen, choose Active Directory Domain Services.

  8. This action will trigger the display of another window, prompting Add features that are required for Active Directory Domain Services. Click on Add Features.

  9. Click on Next until you get to the Confirm installation selections screen. Check Restart the destination server automatically if required and click on Install.

  10. Once the Active Directory Domain Services feature has been installed, a link will appear on the result screen.

  11. Click on Promote this server to a domain controller link on the result screen.

  12. Select create a new forest. Type queryworks.local in the Root domain name textbox and click on Next.

  13. In Forest functional level, select Windows Server 2012 R2. In Type the Directory Services Restore Mode (DSRM) password textbox, type a password and click on Next.

  14. Under DNS Options, you will receive a warning about a DNS delegation that cannot be created because of a missing authoritative parent zone. For purposes of our exercise, you can ignore this warning since we will not be integrating this server to an existing DNS infrastructure.

  15. On the Additional Options screen, confirm the NETBIOS domain name. In our case, it should be QUERYWORKS.

  16. Review and confirm the paths for the AD DS database and SYSVOL.

  17. On the Review Options screen, review to ensure that all the options are correct and click on Next.

  18. On the Prerequisites Check screen, you may receive some warnings. One warning is about the server having a dynamically assigned IP address. For our purposes, this is acceptable. Note that if this option is chosen, it is assumed that a DHCP server is already available on the network. Otherwise, the server will use an APIPA scheme, or Automatic Private IP Addressing (APIPA), which does not work well with domain controllers.

  19. Click on Install to complete the Active Directory Domain Services configuration. The server will be restarted.

  20. Once the virtual machine is back online, you will notice that the login screen now shows the domain information QUERYWORKS\Administrator.