基于Windows Server 2016可以配置无域的Windows群集,因此也能够以此来配置无域的SQL Server AlwaysOn 高可用,这里就针对这一点来做一次测试。
172.18.100.3 DB01172.18.100.3 DB02172.18.100.3 DB03172.18.100.200 SQL-AlwaysOn172.18.100.201 SQL-Listen |
1、首先我们手工写入hosts,三台数据库节点都需要这样做
2、对系统基础信息做下必要修改
Windows PowerShell版权所有 (C) 2016 Microsoft Corporation。保留所有权利。PS C:\Windows\system32> $ENV:ComputerNameWIN-20180211PS C:\Windows\system32> Rename-Computer -NewName "DB01"警告: 所做的更改将在重新启动计算机 WIN-20180211 后生效。PS C:\Windows\system32> Get-NetIPConfigurationInterfaceAlias : Ethernet0InterfaceIndex : 3InterfaceDescription : Intel(R) 82574L Gigabit Network ConnectionNetProfile.Name : 未识别的网络IPv4Address : 172.18.128.0IPv4DefaultGateway :DNSServer : 172.18.0.1PS 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”): yPS C:\Windows\system32> New-NetIPAddress -InterfaceIndex 3 -IpAddress 172.18.100.3 -Prefixlength 16 -DefaultGateway 172.18.0.1IPAddress : 172.18.100.3InterfaceIndex : 3InterfaceAlias : Ethernet0AddressFamily : IPv4Type : UnicastPrefixLength : 16PrefixOrigin : ManualSuffixOrigin : ManualAddressState : TentativeValidLifetime : Infinite ([TimeSpan]::MaxValue)PreferredLifetime : Infinite ([TimeSpan]::MaxValue)SkipAsSource : FalsePolicyStore : ActiveStoreIPAddress : 172.18.100.3InterfaceIndex : 3InterfaceAlias : Ethernet0AddressFamily : IPv4Type : UnicastPrefixLength : 16PrefixOrigin : ManualSuffixOrigin : ManualAddressState : InvalidValidLifetime : Infinite ([TimeSpan]::MaxValue)PreferredLifetime : Infinite ([TimeSpan]::MaxValue)SkipAsSource : FalsePolicyStore : PersistentStorePS C:\Windows\system32> Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses ("8.8.8.8","8.8.4.4")PS C:\Windows\system32> Get-NetIPConfigurationInterfaceAlias : Ethernet0InterfaceIndex : 3InterfaceDescription : Intel(R) 82574L Gigabit Network ConnectionNetProfile.Name : 网络IPv4Address : 172.18.100.3IPv4DefaultGateway : 172.18.0.1DNSServer : 8.8.8.8 8.8.4.4PS 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 GbpsPS 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-DnsClientInterfaceAlias Interface ConnectionSpecificSuffix ConnectionSpecificSuffix RegisterThisConn UseSuffixWhen Index SearchList ectionsAddress Registering-------------- --------- ------------------------ ------------------------ ---------------- -------------Ethernet0 3 sqlserver2016-dwhd.org {} True TrueLoopback Pseudo-Interface 1 1 {} True TruePS C:\Windows\system32> Restart-Computer -Force #重启系统 |
重启之后的计算机信息



































