Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

  • A+
所属分类:Windows Server
摘要

基于Windows Server 2016可以配置无域的Windows群集,因此也能够以此来配置无域的SQL Server AlwaysOn 高可用,这里就针对这一点来做一次测试。

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

172.18.100.3		DB01
172.18.100.3		DB02
172.18.100.3		DB03
172.18.100.200		SQL-AlwaysOn
172.18.100.201		SQL-Listen

1、首先我们手工写入hosts,三台数据库节点都需要这样做

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

2、对系统基础信息做下必要修改

Windows PowerShell
版权所有 (C) 2016 Microsoft Corporation。保留所有权利。

PS C:\Windows\system32> $ENV:ComputerName
WIN-20180211
PS C:\Windows\system32> Rename-Computer -NewName "DB01"
警告: 所做的更改将在重新启动计算机 WIN-20180211 后生效。
PS C:\Windows\system32> Get-NetIPConfiguration


InterfaceAlias       : Ethernet0
InterfaceIndex       : 3
InterfaceDescription : Intel(R) 82574L Gigabit Network Connection
NetProfile.Name      : 未识别的网络
IPv4Address          : 172.18.128.0
IPv4DefaultGateway   :
DNSServer            : 172.18.0.1



PS C:\Windows\system32> Remove-NetIPAddress -InterfaceIndex 3

确认
是否确实要执行此操作?
Performing operation "Remove" on Target "NetIPAddress -IPv4Address 172.18.128.0 -InterfaceIndex 3 -Store Active"
[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“Y”): y
PS C:\Windows\system32> New-NetIPAddress -InterfaceIndex 3 -IpAddress 172.18.100.3 -Prefixlength 16 -DefaultGateway 172.18.0.1


IPAddress         : 172.18.100.3
InterfaceIndex    : 3
InterfaceAlias    : Ethernet0
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 16
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Tentative
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

IPAddress         : 172.18.100.3
InterfaceIndex    : 3
InterfaceAlias    : Ethernet0
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 16
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Invalid
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : PersistentStore



PS C:\Windows\system32> Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses ("8.8.8.8","8.8.4.4")
PS C:\Windows\system32> Get-NetIPConfiguration


InterfaceAlias       : Ethernet0
InterfaceIndex       : 3
InterfaceDescription : Intel(R) 82574L Gigabit Network Connection
NetProfile.Name      : 网络
IPv4Address          : 172.18.100.3
IPv4DefaultGateway   : 172.18.0.1
DNSServer            : 8.8.8.8
                       8.8.4.4



PS C:\Windows\system32> Get-NetAdapter -Name 'Ethernet0'

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet0                 Intel(R) 82574L Gigabit Network Conn...       3 Up           00-0C-29-68-20-EB         1 Gbps


PS C:\Windows\system32> Get-NetAdapter -Name 'Ethernet0' |Set-DNSClient -ConnectionSpecificSuffix "sqlserver2016-dwhd.org" -RegisterThisConnectionsAddress:$true -UseSuffixWhenRegistering:$true -Verbose
####这条命令是设置DNS后缀的
详细信息: Microsoft DNS Client settings will be changed as requested.
This will affect name resolutions on the adapter "Ethernet0".
PS C:\Windows\system32> Get-DnsClient

InterfaceAlias               Interface ConnectionSpecificSuffix ConnectionSpecificSuffix RegisterThisConn UseSuffixWhen
                             Index                              SearchList               ectionsAddress   Registering
--------------               --------- ------------------------ ------------------------ ---------------- -------------
Ethernet0                            3 sqlserver2016-dwhd.org   {}                       True             True
Loopback Pseudo-Interface 1          1                          {}                       True             True


PS C:\Windows\system32> Restart-Computer -Force #重启系统

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

重启之后的计算机信息


安装Windows故障转移群集(所有节点都需要安装)
Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

Windows Server 2016 + SQLServer 2016 搭建无域环境的AlwaysOn集群(一):之节点一配置

lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: