iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 > 01 - 为SQL Server高可用集群配置域控制器
  • 389
分享到

01 - 为SQL Server高可用集群配置域控制器

摘要

In this series for SQL Server Always On Availability Groups, we are covering end to end configurations for sql Server 20


	01 - 为SQL Server高可用集群配置域控制器
[数据库教程]

In this series for SQL Server Always On Availability Groups, we are covering end to end configurations for sql Server 2019 on windows Server 2016. In the article, A comprehensive guide to SQL Server Always On Availability Groups on Windows Server 2016, we configured three virtual Machines with their networking configurations.

In this article, we will explore the following topics.

  • Domain controller, active directory and join servers in the configured domain
  • Assign static IP’s for all virtual machines
  • Disable firewall settings
  • Validate and create a cluster

Prerequisites

  • You should follow the article, A comprehensive guide to SQL Server Always On Availability Groups on Windows Server 2016, and be ready with the Powered on virtual machines.
  • You should get a basic knowledge of domain controller, active directory, IP configurations

Enable Domain Controller and Active Directory in a virtual machine for SQL Server Always On Availability Groups

Before we enable these features and roles, let’s Go over their brief description:

  • Domain Controller: A domain controller servers all security authentications requests for a Windows Server domain. In an organization, each server is a member of the domain controller. We use an FQDN [ServerName].[Domain] to connect with the server
  • DNS: You cannot remember the IP addresses of all servers. For example, we can easily connect to SQLShack.com, but if you have its IP address, it is difficult to remember all URL’s IP address. It is a standard method to associate names instead of the IP address
  • Active Directory: It is a container that consists of organization units for all users, their credentials, groups. All users must authenticate themselves to use an organization resource

We will use the VM named VDITest3 for the configuration of active directory (AD) and domain. Usually, in an organization, you maintain different servers for both AD and domain.

Connect to the Virtual machine for the domain controller and Active Directory configuration. Launch the server manager -> dashboard.

技术图片

Click on the Add Roles and Features. It opens the wizard with brief infORMation. We can skip this step.

技术图片

In the next step, Select option Role-based or feature-based installation and click Next.

技术图片

It shows the VM name, IP address and operating system in the destination server. You can verify the server name before continuing with the installation.

技术图片

In the server roles, enable the Active Directory Domain Services. It opens a pop-up window with its dependency features or services. Click on Add features to install all dependencies.

技术图片

Similarly, enable the DNS server as well.

技术图片

Click Next, and you get an introduction page for the active directory. You can go through the information provided to gain a basic understanding.

技术图片

Similarly, you get an introduction to the DNS services as well.

技术图片

In the next step, review all features and roles installations. You should not install unnecessary services, features, roles on a server as a best practice.

Some roles and features require a reboot of the server. Therefore I put a check on the Restart the destination server automatically if required.

In case, you add a role or feature to an existing server, and I would recommend you reboot manually.

技术图片

It starts the installation of the specified roles and features.

技术图片

We can see features installation is completed.

技术图片

In the server roles, we get a warning message, and it asks us to promote the server as a domain controller because we installed a Domain controller feature on this server. Click on the message- Promote this server as a domain controller.

It opens an active directory services configuration wizard, as shown below. In this deployment configuration, select Add a new forest and specify the root domain name. I specify the root domain as MyDemoSQL.com

技术图片

Click Next. We can go with the default options for the forest functional level and functional domain level. Specify the domain admin passWord. You should store this password in a safe and secure place.

技术图片

In the DNS option, skip the configuration and move towards the next page.

技术图片

It shows the NetBiOS domain name. It is the domain name without .com suffix.

技术图片

By default, it installs the AD database, log file in the Windows directory of the root drive. We can go-ahead for the C drive for the demo purpose.

技术图片

Review your configurations and Click Next to begin active directory configuration.

技术图片

First, it does the prerequisite check. We can ignore the warning messages here.

技术图片

It performs the reboot of the VM.

技术图片

After reboot, you can verify that the computer is part of the MyDemoSQL.com domain. At this point, we have only one VM configured with the domain.

技术图片

Network configuration for the Static IP and DNS Server

We require a static IP for the domain controller VM along with the SQL Server Always On Availability Groups. Type ipconfig and it returns the following output.

In the output, we can note the IPv4 address, subnet mask and default gateway.

技术图片

To set a static IP address, navigate to the Control Panel->Network and Internet->Network Connections. Click on the Change adapter settings.

技术图片

It opens networking options. Here, click on the Internet Protocol Version 4(tcp/IPv4) and Properties.

技术图片

By default, it is configured to obtain the IP address automatically. In this case, if you reboot the server, it might get a new IP address.

Click on the Use the following IP addresses and specify the IP address as follows.

  • IP address: 10.0.2.15
  • Subnet mask: 255.255.255.0
  • Preferred gateway – blank
  • Preferred DNS server: 127.0.0.1 ( because this server itself is a DNS server)

技术图片

Click OK to save the changes. You can again type ipconfig in the command prompt to validate these settings.

技术图片

Configure Reverse lookup zones in DNS for SQL Server Always On Availability Groups

We need to configure a reverse lookup zone in the DNS. It resolves the IP address to the server name. In the server manager dashboard, navigate to tools -> DNS.

技术图片

It opens the following DNS manager with different folders.

技术图片

Open the Reverse Lookup Zones folder and right-click on it to launch a new zone wizard.

技术图片

In the next zone wizard, go with the default option – Primary zone.

技术图片

In the next step, select the zone replication scope- To all DNS servers running on domain controllers in the domain: MyDemoSQL.com

技术图片

Select the type of lookup zone as a Reverse lookup zone.

技术图片

We are using an IPv4 address range, so select the IPv4 reverse lookup zone. In case you use an IPv6 IP range, select the other option.

技术图片

In the reverse lookup zone name, we need to enter the network ID portion of the IP address. It is the digits before the last dot. In my case, I have an IP address in the range 10.0.2.15. Therefore, the network SID is 10.0.2

技术图片

Accept the recommended method of the dynamic update as Allow only secure dynamic updates and click Next.

技术图片

Review the configuration and click Finish to create a reverse lookup zone.

技术图片

It shows the following reverse lookup zone as per our configurations.

技术图片

Create an active directory user and assign domain admin permissions for SQL Server Always On availability groups

Type DSA.msc in the run, and it launches the AD containers with all users, computer service accounts.

技术图片

To create a new AD user, right-click on the container (in this case, Users) and create a new user.

Specify the first name, last name, user login name. It should be a unique login name in an OU.

技术图片

On the next page, specify the password of this AD user along with configuration options. You can specify options such as :

  • User must change password at next logon
  • User cannot change password
  • Password never expires
  • An account is disabled

For my demo purpose, I have unchecked all user password configuration.

技术图片

Review and confirm the user details to create in the Users group.

技术图片

In the active directory users, double click on the Domain Admins.

技术图片

It opens the domain admins properties. Click on Add, search for the AD user we created and add it here.

技术图片

Add this user as an administrator in all three VM’s as well. Add this user to the local administrator of all three VM’s. Open the computer management from the server manager -> Tools-> Computer management.

技术图片

Add SQLnode1 and SQLNode2 in the domain for SQL Server Always On availability groups

In the next step, open the network properties of the SQLNode1 and SQLNode2. Enter the following values for the IP address.

SQLNode1 network configuration

  • IP address: 10.0.2.21
  • Subnet mask: 255.255.255.0
  • Preferred gateway – blank
  • Preferred DNS server: 10.0.2.15 ( it is the IP address of our DNS server)

技术图片

Validate IP configurations

技术图片

SQLNode2 network configuration

  • IP address: 10.0.2.22
  • Subnet mask: 255.255.255.0
  • Preferred gateway – blank
  • Preferred DNS server: 10.0.2.15 ( it is the IP address of our DNS server)

技术图片

Validate IP configurations

技术图片

Add SQLNode1 in the MyDemoSQL.com domain for SQL Server Always On availability groups

In this step, we need to join the VM to the existing domain MyDemoSQL.com. To add a server into the domain, click on the server name in the server dashboard.

技术图片

It opens the system properties. Click on the change, and you can specify the computer name and its domain.

技术图片

Click on OK, and it joins the VM into the specified domain. You need to specify the domain admin user name and password to allow it as a member in the MyDemoSQL.com domain.

技术图片

You get a welcome message, as shown below, once it adds the server successfully.

技术图片

It reboots the VM. You should

技术图片

Add SQLNode2 in the MyDemoSQL.com domain

Similarly, add the SQLNode2 VM as well in the MyDemoSQL.com domain and validate it.

技术图片

Conclusion

In this article, we configured Domain Controller, Active Directory and DNS in a virtual machine. Later, we configured Reverse lookup zones, domain admin account, local admin account and added the servers in the domain for SQL Server Always On availability group.

In my next article, I will walk you through the configuration of failover clusters, quorum configuration and storage drives allocation for the SQL nodes.

01 - 为SQL Server高可用集群配置域控制器

原文地址:https://www.cnblogs.com/zhouwy/p/14454917.html

您可能感兴趣的文档:

--结束END--

本文标题: 01 - 为SQL Server高可用集群配置域控制器

本文链接: https://www.lsjlt.com/news/8078.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • oracle怎么查询当前用户所有的表
    要查询当前用户拥有的所有表,可以使用以下 sql 命令:select * from user_tables; 如何查询当前用户拥有的所有表 要查询当前用户拥有的所有表,可以使...
    99+
    2024-05-15
    oracle
  • oracle怎么备份表中数据
    oracle 表数据备份的方法包括:导出数据 (exp):将表数据导出到外部文件。导入数据 (imp):将导出文件中的数据导入表中。用户管理的备份 (umr):允许用户控制备份和恢复过程...
    99+
    2024-05-15
    oracle
  • oracle怎么做到数据实时备份
    oracle 实时备份通过持续保持数据库和事务日志的副本来实现数据保护,提供快速恢复。实现机制主要包括归档重做日志和 asm 卷管理系统。它最小化数据丢失、加快恢复时间、消除手动备份任务...
    99+
    2024-05-15
    oracle 数据丢失
  • oracle怎么查询所有的表空间
    要查询 oracle 中的所有表空间,可以使用 sql 语句 "select tablespace_name from dba_tablespaces",其中 dba_tabl...
    99+
    2024-05-15
    oracle
  • oracle怎么创建新用户并赋予权限设置
    答案:要创建 oracle 新用户,请执行以下步骤:以具有 create user 权限的用户身份登录;在 sql*plus 窗口中输入 create user identified ...
    99+
    2024-05-15
    oracle
  • oracle怎么建立新用户
    在 oracle 数据库中创建用户的方法:使用 sql*plus 连接数据库;使用 create user 语法创建新用户;根据用户需要授予权限;注销并重新登录以使更改生效。 如何在 ...
    99+
    2024-05-15
    oracle
  • oracle怎么创建新用户并赋予权限密码
    本教程详细介绍了如何使用 oracle 创建一个新用户并授予其权限:创建新用户并设置密码。授予对特定表的读写权限。授予创建序列的权限。根据需要授予其他权限。 如何使用 Oracle 创...
    99+
    2024-05-15
    oracle
  • oracle怎么查询时间段内的数据记录表
    在 oracle 数据库中查询指定时间段内的数据记录表,可以使用 between 操作符,用于比较日期或时间的范围。语法:select * from table_name wh...
    99+
    2024-05-15
    oracle
  • oracle怎么查看表的分区
    问题:如何查看 oracle 表的分区?步骤:查询数据字典视图 all_tab_partitions,指定表名。结果显示分区名称、上边界值和下边界值。 如何查看 Oracle 表的分区...
    99+
    2024-05-15
    oracle
  • oracle怎么导入dump文件
    要导入 dump 文件,请先停止 oracle 服务,然后使用 impdp 命令。步骤包括:停止 oracle 数据库服务。导航到 oracle 数据泵工具目录。使用 impdp 命令导...
    99+
    2024-05-15
    oracle
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作